2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: Samuel Attard <samuel.r.attard@gmail.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:50:24 -0700
|
|
|
|
Subject: blink_initialization_order.patch
|
|
|
|
|
|
|
|
Backport of https://chromium-review.googlesource.com/c/chromium/src/+/1030530
|
|
|
|
to fix the order of V8 and Blink initialization. Also fixes order
|
|
|
|
of DidCreateScriptContext notification with initialization of window globals
|
|
|
|
to fix electron/electron#13787. The backport landed in Chromium 67 but the
|
|
|
|
DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
2020-01-17 18:41:52 +00:00
|
|
|
index c845acb8321e94c916798826a168e06df34ffff4..941ca9d3905c0c2f36606655bf60e9e9bd1f9196 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
|
|
|
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
2020-01-17 18:41:52 +00:00
|
|
|
@@ -211,11 +211,10 @@ void LocalWindowProxy::Initialize() {
|
2018-09-14 05:02:16 +00:00
|
|
|
GetFrame()->IsMainFrame());
|
2018-09-21 00:30:26 +00:00
|
|
|
MainThreadDebugger::Instance()->ContextCreated(script_state_, GetFrame(),
|
|
|
|
origin);
|
2018-09-14 05:02:16 +00:00
|
|
|
+ InstallConditionalFeatures();
|
|
|
|
GetFrame()->Client()->DidCreateScriptContext(context, world_->GetWorldId());
|
|
|
|
}
|
|
|
|
|
|
|
|
- InstallConditionalFeatures();
|
|
|
|
-
|
2019-10-18 19:57:34 +00:00
|
|
|
if (World().IsMainWorld()) {
|
|
|
|
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
|
|
|
|
}
|