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

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

Issue 2122063002: [OriginTrials] Don't attempt to initialize origin trials in isolated worlds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only install origin trials in main world Created 4 years, 5 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/WindowProxy.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
index 0ad555276d7f6fdbcad626cc62538a9f75d264e6..c6cb29661fc2cab3797a97d98c6bc06d8cc97012 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
@@ -272,11 +272,13 @@ bool WindowProxy::initialize()
}
// If Origin Trials have been registered before the V8 context was ready,
// then inject them into the context now
- ExecutionContext* executionContext = m_scriptState->getExecutionContext();
- if (executionContext) {
- OriginTrialContext* originTrialContext = OriginTrialContext::from(executionContext);
- if (originTrialContext)
- originTrialContext->initializePendingFeatures();
+ if (m_world->isMainWorld()) {
+ ExecutionContext* executionContext = m_scriptState->getExecutionContext();
+ if (executionContext) {
+ OriginTrialContext* originTrialContext = OriginTrialContext::from(executionContext);
+ if (originTrialContext)
+ originTrialContext->initializePendingFeatures();
+ }
}
return true;
}
« 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