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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp

Issue 2005433002: [Origin Trials] Install origin trial bindings on V8 context conditionally (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-ef-install
Patch Set: Rebase; Respect runtime-enabled flags as well 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/V8Binding.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
index 44f8a1e7a85e2a92ee440459aa221eefaba9befa..dacdd97ab2eb6f3992ab807ee2cdd03eb04b5693 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
@@ -727,6 +727,30 @@ void registerToExecutionContextForModules(ExecutionContext* (*toExecutionContext
s_toExecutionContextForModules = toExecutionContextForModules;
}
+void initializeOriginTrialsCore(v8::Local<v8::Context> context, const DOMWrapperWorld& world)
+{
+ DCHECK(!context.IsEmpty());
+ context->Enter();
+ // Initialization code for origin trials for core bindings should go here
+ context->Exit();
+}
+
+namespace {
+initializeOriginTrialsFunction s_initializeOriginTrialsFunction = &initializeOriginTrialsCore;
+}
+
+void initializeOriginTrials(v8::Local<v8::Context> context, const DOMWrapperWorld& world)
+{
+ (*s_initializeOriginTrialsFunction)(context, world);
+}
+
+initializeOriginTrialsFunction setInitializeOriginTrialsFunction(initializeOriginTrialsFunction fn)
+{
+ initializeOriginTrialsFunction originalFunction = s_initializeOriginTrialsFunction;
+ s_initializeOriginTrialsFunction = fn;
+ return originalFunction;
+}
+
ExecutionContext* currentExecutionContext(v8::Isolate* isolate)
{
return toExecutionContext(isolate->GetCurrentContext());
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Binding.h ('k') | third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698