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

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

Issue 2035713002: binding: Supports V8PrivateProperty::getOrUndefined. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added function comments to explain the difference. 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 | « no previous file | 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 8d7269577dce7423779dd0294673b1bdfeca9ddb..2a7349b8bf60c0b09baeaf4059f459e000801e86 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h
@@ -72,6 +72,13 @@ public:
return v8CallBoolean(object->HasPrivate(context, m_privateSymbol));
}
+ // Returns the value of the private property if set, or undefined.
+ v8::Local<v8::Value> getOrUndefined(v8::Local<v8::Context> context, v8::Local<v8::Object> object) const
+ {
+ return v8CallOrCrash(object->GetPrivate(context, m_privateSymbol));
+ }
+
+ // Returns the value of the private property if set, or an empty handle.
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 | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698