| 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 23 matching lines...) Expand all Loading... |
| 34 V(error) \ | 34 V(error) \ |
| 35 V(event) \ | 35 V(event) \ |
| 36 V(idbCursorRequest) \ | 36 V(idbCursorRequest) \ |
| 37 V(port1) \ | 37 V(port1) \ |
| 38 V(port2) \ | 38 V(port2) \ |
| 39 V(state) \ | 39 V(state) \ |
| 40 V(stringData) \ | 40 V(stringData) \ |
| 41 V(thenableHiddenPromise) \ | 41 V(thenableHiddenPromise) \ |
| 42 V(toStringString) \ | 42 V(toStringString) \ |
| 43 V(injectedScriptNative) \ | 43 V(injectedScriptNative) \ |
| 44 V(bodyStream) \ |
| 44 SCRIPT_PROMISE_PROPERTIES(V, Promise) \ | 45 SCRIPT_PROMISE_PROPERTIES(V, Promise) \ |
| 45 SCRIPT_PROMISE_PROPERTIES(V, Resolver) | 46 SCRIPT_PROMISE_PROPERTIES(V, Resolver) |
| 46 | 47 |
| 47 class CORE_EXPORT V8HiddenValue { | 48 class CORE_EXPORT V8HiddenValue { |
| 48 public: | 49 public: |
| 49 #define V8_DECLARE_METHOD(name) static v8::Local<v8::String> name(v8::Isolate* i
solate); | 50 #define V8_DECLARE_METHOD(name) static v8::Local<v8::String> name(v8::Isolate* i
solate); |
| 50 V8_HIDDEN_VALUES(V8_DECLARE_METHOD); | 51 V8_HIDDEN_VALUES(V8_DECLARE_METHOD); |
| 51 #undef V8_DECLARE_METHOD | 52 #undef V8_DECLARE_METHOD |
| 52 | 53 |
| 53 static v8::Local<v8::Value> getHiddenValue(v8::Isolate*, v8::Local<v8::Objec
t>, v8::Local<v8::String>); | 54 static v8::Local<v8::Value> getHiddenValue(v8::Isolate*, v8::Local<v8::Objec
t>, v8::Local<v8::String>); |
| 54 static bool setHiddenValue(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8
::String>, v8::Local<v8::Value>); | 55 static bool setHiddenValue(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8
::String>, v8::Local<v8::Value>); |
| 55 static bool deleteHiddenValue(v8::Isolate*, v8::Local<v8::Object>, v8::Local
<v8::String>); | 56 static bool deleteHiddenValue(v8::Isolate*, v8::Local<v8::Object>, v8::Local
<v8::String>); |
| 56 static v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*,
ScriptWrappable*, v8::Local<v8::String>); | 57 static v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*,
ScriptWrappable*, v8::Local<v8::String>); |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 #define V8_DECLARE_FIELD(name) ScopedPersistent<v8::String> m_##name; | 60 #define V8_DECLARE_FIELD(name) ScopedPersistent<v8::String> m_##name; |
| 60 V8_HIDDEN_VALUES(V8_DECLARE_FIELD); | 61 V8_HIDDEN_VALUES(V8_DECLARE_FIELD); |
| 61 #undef V8_DECLARE_FIELD | 62 #undef V8_DECLARE_FIELD |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace blink | 65 } // namespace blink |
| 65 | 66 |
| 66 #endif // V8HiddenValue_h | 67 #endif // V8HiddenValue_h |
| OLD | NEW |