electron/patches/common/chromium/blink_initialization_order.patch
Jeremy Apthorp 6555be2636 chore: bump chromium to 74.0.3729.27 (master) (#17345)
* chore: bump chromium to 74.0.3729.5 (master)

* Remove ScopedBlockingCall constructor without location

https://chromium-review.googlesource.com/c/chromium/src/+/1496560

* Use XCode 9.4.1 for Mac SDK 10.13

* chore: roll chromium 74.0.3729.27
2019-03-21 11:45:22 -04:00

28 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
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
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
index a56856c704ec7fa65d560a8604d7303be707a1ac..127a4e2dbf5984bb3512e426350d648e1d4837ab 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -200,11 +200,10 @@ void LocalWindowProxy::Initialize() {
GetFrame()->IsMainFrame());
MainThreadDebugger::Instance()->ContextCreated(script_state_, GetFrame(),
origin);
+ InstallConditionalFeatures();
GetFrame()->Client()->DidCreateScriptContext(context, world_->GetWorldId());
}
- InstallConditionalFeatures();
-
// This needs to go after everything else since it accesses the window object.
InitializeV8ExtrasBinding(script_state_);