1bbb407dc9
* chore: bump chromium in DEPS to 99e60beb593ecf98f8a441e3f03a13b68cfcb311 * update patches * chore: bump chromium in DEPS to b1abadda21f417ba5e8276c4dd779d31445d16cd * update patches * 2146532: gtkui: Fix standalone Ozone/Wayland configuration https://chromium-review.googlesource.com/c/chromium/src/+/2146532 * 2145152: Pass source URL when setting a cookie https://chromium-review.googlesource.com/c/chromium/src/+/2145152 * lint * chore: bump chromium in DEPS to 8897189f1da5a3670bbe32d343767fd71f80d779 * chore: bump chromium in DEPS to 8ac51eeee93a02ed5b81f47e28627079edeecde0 * chore: bump chromium in DEPS to e897b8003f3a5f3c8d654eee9b03c513046ae7ea * chore: bump chromium in DEPS to 7b80f9c82122600291d041c530698616a4716cdf * Update patches * Move definition of WebInputEvent enums into mojo https://chromium-review.googlesource.com/c/chromium/src/+/2152777 * update patches Co-authored-by: Electron Bot <anonymous@electronjs.org> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
41 lines
1.8 KiB
Diff
41 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
Date: Thu, 20 Sep 2018 17:45:03 -0700
|
|
Subject: blink_local_frame.patch
|
|
|
|
According to electron/electron#3699, it is unreliable to use |unload|
|
|
event for process.exit('exit'), so we have to do that in
|
|
willReleaseScriptContext.
|
|
|
|
However Chromium then disallowed scripting in willReleaseScriptContext
|
|
in https://codereview.chromium.org/1657583002, and crash will happen
|
|
when there is code doing that.
|
|
|
|
This patch reverts the change to fix the crash in Electron.
|
|
|
|
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
|
index 9f3d51c820c850737d4ce2489bbddeee08fb1792..bd5a98dfe75bcaf3a84a9ae4e96f35caa7848aa7 100644
|
|
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
|
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
|
@@ -472,10 +472,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
|
}
|
|
CHECK(!view_ || !view_->IsAttached());
|
|
|
|
- // This is the earliest that scripting can be disabled:
|
|
- // - FrameLoader::Detach() can fire XHR abort events
|
|
- // - Document::Shutdown() can dispose plugins which can run script.
|
|
- ScriptForbiddenScope forbid_script;
|
|
if (!Client())
|
|
return;
|
|
|
|
@@ -493,6 +489,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
|
// Notify ScriptController that the frame is closing, since its cleanup ends
|
|
// up calling back to LocalFrameClient via WindowProxy.
|
|
GetScriptController().ClearForClose();
|
|
+ // This is the earliest that scripting can be disabled:
|
|
+ // - FrameLoader::Detach() can fire XHR abort events
|
|
+ // - Document::Shutdown() can dispose plugins which can run script.
|
|
+ ScriptForbiddenScope forbid_script;
|
|
|
|
// TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes.
|
|
CHECK(!view_->IsAttached());
|