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