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

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

Issue 2640823004: Allow origin trials to be enabled by script (Closed)
Patch Set: Rebase Created 3 years, 11 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/V8PerContextData.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h
index dd345df3a033686b8a8a49f20ed2d21f5974f2d0..86ecec0e1dfaef1db85fcd4c6589f4be6d6648d3 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h
@@ -85,6 +85,14 @@ class CORE_EXPORT V8PerContextData final {
: constructorForTypeSlowCase(type);
}
+ // Retrieve the constructor for a type, but only if it already exists (avoids
+ // triggering initialization, as in constructorForType). If the constructor is
+ // not found, the return value is non-null, but empty (IsEmpty()).
+ v8::Local<v8::Function> constructorForTypeFromCache(
+ const WrapperTypeInfo* type) {
+ return m_constructorMap.Get(type);
+ }
+
v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*);
void addCustomElementBinding(std::unique_ptr<V0CustomElementBinding>);

Powered by Google App Engine
This is Rietveld 408576698