| 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 30 matching lines...) Expand all Loading... |
| 41 V(internalBodyStream) \ | 41 V(internalBodyStream) \ |
| 42 V(port1) \ | 42 V(port1) \ |
| 43 V(port2) \ | 43 V(port2) \ |
| 44 V(readableStreamReaderInResponse) \ | 44 V(readableStreamReaderInResponse) \ |
| 45 V(state) \ | 45 V(state) \ |
| 46 V(stringData) \ | 46 V(stringData) \ |
| 47 V(testInterfaces) \ | 47 V(testInterfaces) \ |
| 48 V(thenableHiddenPromise) \ | 48 V(thenableHiddenPromise) \ |
| 49 V(toStringString) \ | 49 V(toStringString) \ |
| 50 V(injectedScriptNative) \ | 50 V(injectedScriptNative) \ |
| 51 V(webgl2DTextures) \ |
| 52 V(webgl2DArrayTextures) \ |
| 53 V(webgl3DTextures) \ |
| 54 V(webglAttachments) \ |
| 55 V(webglBuffers) \ |
| 56 V(webglCubeMapTextures) \ |
| 57 V(webglExtensions) \ |
| 58 V(webglMisc) \ |
| 59 V(webglShaders) \ |
| 51 SCRIPT_PROMISE_PROPERTIES(V, Promise) \ | 60 SCRIPT_PROMISE_PROPERTIES(V, Promise) \ |
| 52 SCRIPT_PROMISE_PROPERTIES(V, Resolver) | 61 SCRIPT_PROMISE_PROPERTIES(V, Resolver) |
| 53 | 62 |
| 54 class CORE_EXPORT V8HiddenValue { | 63 class CORE_EXPORT V8HiddenValue { |
| 55 USING_FAST_MALLOC(V8HiddenValue); | 64 USING_FAST_MALLOC(V8HiddenValue); |
| 56 WTF_MAKE_NONCOPYABLE(V8HiddenValue); | 65 WTF_MAKE_NONCOPYABLE(V8HiddenValue); |
| 57 public: | 66 public: |
| 58 static PassOwnPtr<V8HiddenValue> create() { return adoptPtr(new V8HiddenValu
e()); } | 67 static PassOwnPtr<V8HiddenValue> create() { return adoptPtr(new V8HiddenValu
e()); } |
| 59 | 68 |
| 60 #define V8_DECLARE_METHOD(name) static v8::Local<v8::String> name(v8::Isolate* i
solate); | 69 #define V8_DECLARE_METHOD(name) static v8::Local<v8::String> name(v8::Isolate* i
solate); |
| 61 V8_HIDDEN_VALUES(V8_DECLARE_METHOD); | 70 V8_HIDDEN_VALUES(V8_DECLARE_METHOD); |
| 62 #undef V8_DECLARE_METHOD | 71 #undef V8_DECLARE_METHOD |
| 63 | 72 |
| 64 static v8::Local<v8::Value> getHiddenValue(ScriptState*, v8::Local<v8::Objec
t>, v8::Local<v8::String>); | 73 static v8::Local<v8::Value> getHiddenValue(ScriptState*, v8::Local<v8::Objec
t>, v8::Local<v8::String>); |
| 65 static bool setHiddenValue(ScriptState*, v8::Local<v8::Object>, v8::Local<v8
::String>, v8::Local<v8::Value>); | 74 static bool setHiddenValue(ScriptState*, v8::Local<v8::Object>, v8::Local<v8
::String>, v8::Local<v8::Value>); |
| 66 static bool deleteHiddenValue(ScriptState*, v8::Local<v8::Object>, v8::Local
<v8::String>); | 75 static bool deleteHiddenValue(ScriptState*, v8::Local<v8::Object>, v8::Local
<v8::String>); |
| 67 static v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(ScriptState*,
ScriptWrappable*, v8::Local<v8::String>); | 76 static v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(ScriptState*,
ScriptWrappable*, v8::Local<v8::String>); |
| 68 | 77 |
| 69 private: | 78 private: |
| 70 V8HiddenValue() { } | 79 V8HiddenValue() { } |
| 71 | 80 |
| 72 #define V8_DECLARE_FIELD(name) ScopedPersistent<v8::String> m_##name; | 81 #define V8_DECLARE_FIELD(name) ScopedPersistent<v8::String> m_##name; |
| 73 V8_HIDDEN_VALUES(V8_DECLARE_FIELD); | 82 V8_HIDDEN_VALUES(V8_DECLARE_FIELD); |
| 74 #undef V8_DECLARE_FIELD | 83 #undef V8_DECLARE_FIELD |
| 75 }; | 84 }; |
| 76 | 85 |
| 77 } // namespace blink | 86 } // namespace blink |
| 78 | 87 |
| 79 #endif // V8HiddenValue_h | 88 #endif // V8HiddenValue_h |
| OLD | NEW |