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

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: Fix multiple definition of signature; addressing nits 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..389e4556f5f5dc08c82d98876ed2912805fd17b7 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
@@ -818,6 +818,32 @@ v8::Local<v8::Context> toV8ContextEvenIfDetached(Frame* frame, DOMWrapperWorld&
return frame->windowProxy(world)->contextIfInitialized();
}
+void installOriginTrialsCore(ScriptState* scriptState)
+{
+ // TODO(iclelland): Generate all of this logic at compile-time, based on the
+ // configuration of origin trial enabled attibutes and interfaces in IDL
+ // files. (crbug.com/615060)
+
+ // Initialization code for origin trials for core bindings, if necessary,
+ // should go here.
+}
+
+namespace {
+InstallOriginTrialsFunction s_installOriginTrialsFunction = &installOriginTrialsCore;
+}
+
+void installOriginTrials(ScriptState* scriptState)
+{
+ (*s_installOriginTrialsFunction)(scriptState);
+}
+
+InstallOriginTrialsFunction setInstallOriginTrialsFunction(InstallOriginTrialsFunction newInstallOriginTrialsFunction)
+{
+ InstallOriginTrialsFunction originalFunction = s_installOriginTrialsFunction;
+ s_installOriginTrialsFunction = newInstallOriginTrialsFunction;
+ return originalFunction;
+}
+
void crashIfIsolateIsDead(v8::Isolate* isolate)
{
if (isolate->IsDead()) {

Powered by Google App Engine
This is Rietveld 408576698