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

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

Issue 2034573004: FYI: Adds V8PrivateProperty::getOrUndefined(). (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
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..a7096f94e9147634f76964cb5227dda2fcace846 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h
@@ -27,7 +27,18 @@ class ScriptWrappable;
X(IntersectionObserver, Callback) \
X(MutationObserver, Callback) \
X(PerformanceObserver, Callback) \
- X(V8NodeFilterCondition, Filter)
+ X(V8NodeFilterCondition, Filter) \
+ X(WebGLRenderingContext, Extensions) \
+ X(WebGLRenderingContext, Misc) \
+ X(WebGLRenderingContext, Queries) \
+ X(WebGLRenderingContext, Samplers) \
+ X(WebGLRenderingContext, Textures2D) \
+ X(WebGLRenderingContext, Textures2DArray) \
+ X(WebGLRenderingContext, Textures3D) \
+ X(WebGLRenderingContext, TexturesCubeMap) \
+ X(WebGLFramebuffer, Attachments) \
+ X(WebGLProgram, Shaders) \
+ X(WebGLVertexArrayObjectBase, Buffers)
// The getter's name for a private property.
#define V8_PRIVATE_PROPERTY_GETTER_NAME(InterfaceName, PrivateKeyName) \
@@ -72,6 +83,11 @@ public:
return v8CallBoolean(object->HasPrivate(context, m_privateSymbol));
}
+ v8::Local<v8::Value> getOrUndefined(v8::Local<v8::Context> context, v8::Local<v8::Object> object) const
+ {
+ return v8CallOrCrash(object->GetPrivate(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)))

Powered by Google App Engine
This is Rietveld 408576698