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