| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8HiddenValue_h | 5 #ifndef V8HiddenValue_h |
| 6 #define V8HiddenValue_h | 6 #define V8HiddenValue_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScopedPersistent.h" | 8 #include "bindings/core/v8/ScopedPersistent.h" |
| 9 #include "bindings/core/v8/ScriptPromiseProperties.h" | 9 #include "bindings/core/v8/ScriptPromiseProperties.h" |
| 10 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 V(idbCursorRequest) \ | 38 V(idbCursorRequest) \ |
| 39 V(internalBodyStream) \ | 39 V(internalBodyStream) \ |
| 40 V(port1) \ | 40 V(port1) \ |
| 41 V(port2) \ | 41 V(port2) \ |
| 42 V(readableStreamReaderInResponse) \ | 42 V(readableStreamReaderInResponse) \ |
| 43 V(state) \ | 43 V(state) \ |
| 44 V(testInterfaces) \ | 44 V(testInterfaces) \ |
| 45 V(thenableHiddenPromise) \ | 45 V(thenableHiddenPromise) \ |
| 46 V(toStringString) \ | 46 V(toStringString) \ |
| 47 V(injectedScriptNative) \ | 47 V(injectedScriptNative) \ |
| 48 V(webgl2DTextures) \ | |
| 49 V(webgl2DArrayTextures) \ | |
| 50 V(webgl3DTextures) \ | |
| 51 V(webglAttachments) \ | |
| 52 V(webglBuffers) \ | |
| 53 V(webglCubeMapTextures) \ | |
| 54 V(webglExtensions) \ | |
| 55 V(webglMisc) \ | |
| 56 V(webglQueries) \ | |
| 57 V(webglSamplers) \ | |
| 58 V(webglShaders) \ | |
| 59 SCRIPT_PROMISE_PROPERTIES(V, Promise) \ | 48 SCRIPT_PROMISE_PROPERTIES(V, Promise) \ |
| 60 SCRIPT_PROMISE_PROPERTIES(V, Resolver) | 49 SCRIPT_PROMISE_PROPERTIES(V, Resolver) |
| 61 | 50 |
| 62 class CORE_EXPORT V8HiddenValue { | 51 class CORE_EXPORT V8HiddenValue { |
| 63 USING_FAST_MALLOC(V8HiddenValue); | 52 USING_FAST_MALLOC(V8HiddenValue); |
| 64 WTF_MAKE_NONCOPYABLE(V8HiddenValue); | 53 WTF_MAKE_NONCOPYABLE(V8HiddenValue); |
| 65 public: | 54 public: |
| 66 static PassOwnPtr<V8HiddenValue> create() { return adoptPtr(new V8HiddenValu
e()); } | 55 static PassOwnPtr<V8HiddenValue> create() { return adoptPtr(new V8HiddenValu
e()); } |
| 67 | 56 |
| 68 #define V8_DECLARE_METHOD(name) static v8::Local<v8::String> name(v8::Isolate* i
solate); | 57 #define V8_DECLARE_METHOD(name) static v8::Local<v8::String> name(v8::Isolate* i
solate); |
| 69 V8_HIDDEN_VALUES(V8_DECLARE_METHOD); | 58 V8_HIDDEN_VALUES(V8_DECLARE_METHOD); |
| 70 #undef V8_DECLARE_METHOD | 59 #undef V8_DECLARE_METHOD |
| 71 | 60 |
| 72 static v8::Local<v8::Value> getHiddenValue(ScriptState*, v8::Local<v8::Objec
t>, v8::Local<v8::String>); | 61 static v8::Local<v8::Value> getHiddenValue(ScriptState*, v8::Local<v8::Objec
t>, v8::Local<v8::String>); |
| 73 static bool setHiddenValue(ScriptState*, v8::Local<v8::Object>, v8::Local<v8
::String>, v8::Local<v8::Value>); | 62 static bool setHiddenValue(ScriptState*, v8::Local<v8::Object>, v8::Local<v8
::String>, v8::Local<v8::Value>); |
| 74 static bool deleteHiddenValue(ScriptState*, v8::Local<v8::Object>, v8::Local
<v8::String>); | 63 static bool deleteHiddenValue(ScriptState*, v8::Local<v8::Object>, v8::Local
<v8::String>); |
| 75 static v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(ScriptState*,
ScriptWrappable*, v8::Local<v8::String>); | 64 static v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(ScriptState*,
ScriptWrappable*, v8::Local<v8::String>); |
| 76 | 65 |
| 77 private: | 66 private: |
| 78 V8HiddenValue() { } | 67 V8HiddenValue() { } |
| 79 | 68 |
| 80 #define V8_DECLARE_FIELD(name) ScopedPersistent<v8::String> m_##name; | 69 #define V8_DECLARE_FIELD(name) ScopedPersistent<v8::String> m_##name; |
| 81 V8_HIDDEN_VALUES(V8_DECLARE_FIELD); | 70 V8_HIDDEN_VALUES(V8_DECLARE_FIELD); |
| 82 #undef V8_DECLARE_FIELD | 71 #undef V8_DECLARE_FIELD |
| 83 }; | 72 }; |
| 84 | 73 |
| 85 } // namespace blink | 74 } // namespace blink |
| 86 | 75 |
| 87 #endif // V8HiddenValue_h | 76 #endif // V8HiddenValue_h |
| OLD | NEW |