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

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

Issue 2458183002: Eagerly install Origin Trial features on window (Closed)
Patch Set: Use correct context and enter it before installing attributes on window Created 4 years, 1 month 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/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 edada54b4d3a554001d01677200f49bb29245970..77c9e92a8bb0da8e7cc3c65f4a12f29ead155eb8 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
@@ -30,6 +30,7 @@
#include "bindings/core/v8/WindowProxy.h"
+#include "bindings/core/v8/ConditionalFeatures.h"
#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/ScriptController.h"
#include "bindings/core/v8/V8Binding.h"
@@ -263,11 +264,6 @@ bool WindowProxy::initialize() {
setSecurityToken(origin);
}
- // All interfaces must be registered to V8PerContextData.
- // So we explicitly call constructorForType for the global object.
- V8PerContextData::from(context)->constructorForType(
- &V8Window::wrapperTypeInfo);
-
if (m_frame->isLocalFrame()) {
LocalFrame* frame = toLocalFrame(m_frame);
MainThreadDebugger::instance()->contextCreated(m_scriptState.get(), frame,
@@ -275,6 +271,10 @@ bool WindowProxy::initialize() {
frame->loader().client()->didCreateScriptContext(
context, m_world->extensionGroup(), m_world->worldId());
}
+ // If conditional features for window have been queued before the V8 context
+ // was ready, then inject them into the context now
+ installPendingConditionalFeaturesOnWindow(m_scriptState.get());
haraken 2016/11/03 14:43:07 Just help me understand: Who prevents us from inst
iclelland 2016/11/03 16:00:01 We don't want to do that -- thanks for catching it
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698