a58bc42ed0
* chore: bump chromium in DEPS to 68d7ef9b31f3f164a967109212e84a8d756cc80f * Update patches * Update location of file_info.h * Update sysroots * chore: bump chromium in DEPS to 47114394b1c8a35438d19da7538142380551a2ce * Update patches * ci: update docker image to pickup new ia32 dep * Skip .info files in dist.zip 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 28d4c323a1c94ad61f83d4d9cc37863801f02276..85cb2f33afff53c8e524b04e398241928acf8305 100644
|
|
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
|
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
|
@@ -357,10 +357,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;
|
|
|
|
@@ -378,6 +374,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());
|