Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h

Issue 2027113003: binding: Makes PrivateScriptRunner use V8PrivateProperty instead of V8HiddenValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h b/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h
index 6bb42871b7d6e9f577d420cff21d3f35659308c4..e982c84076f854e64d5fd1d684312faa0f5b548a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h
@@ -22,7 +22,8 @@ class ScriptWrappable;
// Apply |X| for each pair of (InterfaceName, PrivateKeyName).
#define V8_PRIVATE_PROPERTY_FOR_EACH(X) \
- X(MessageEvent, CachedData)
+ X(MessageEvent, CachedData) \
+ X(PrivateScriptRunner, IsInitialized)
// The getter's name for a private property.
#define V8_PRIVATE_PROPERTY_GETTER_NAME(InterfaceName, PrivateKeyName) \
@@ -62,6 +63,11 @@ public:
class CORE_EXPORT Symbol {
STACK_ALLOCATED();
public:
+ bool hasValue(v8::Local<v8::Context> context, v8::Local<v8::Object> object) const
+ {
+ return v8CallBoolean(object->HasPrivate(context, m_privateSymbol));
+ }
+
v8::Local<v8::Value> get(v8::Local<v8::Context> context, v8::Local<v8::Object> object) const
{
if (!v8CallBoolean(object->HasPrivate(context, m_privateSymbol)))
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698