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