chore: bump chromium to a264339194bfa02f5ecb3b8cba449 (master) (#27111)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
1cd72425aa
commit
adf0a73543
86 changed files with 503 additions and 460 deletions
|
@ -7,17 +7,52 @@ 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.
|
||||
Refs changes in:
|
||||
* https://codereview.chromium.org/1657583002
|
||||
* https://chromium-review.googlesource.com/c/chromium/src/+/2596880
|
||||
* https://chromium-review.googlesource.com/c/chromium/src/+/2597169
|
||||
|
||||
This patch reverts the change to fix the crash in Electron.
|
||||
This patch reverts the changes to fix associated crashes in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index 0d5d1bf784f63f00724cdcf71263752e7715ebf1..5b7869255ec81c4a7bd1e0918609aafe11849934 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -135,14 +135,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
|
||||
DCHECK(!IsDetached());
|
||||
|
||||
- // TODO(dcheng): FocusController::FrameDetached() *should* fire JS events,
|
||||
- // hence the above check for `client_` being null. However, when this was
|
||||
- // previously placed before the `FrameDetached()` call, nothing crashes, which
|
||||
- // is suspicious. Investigate if we really don't need to fire JS events--and
|
||||
- // if we don't, move `forbid_scripts` up to be instantiated sooner and
|
||||
- // simplify this code.
|
||||
- ScriptForbiddenScope forbid_scripts;
|
||||
-
|
||||
if (type == FrameDetachType::kRemove) {
|
||||
if (provisional_frame_) {
|
||||
provisional_frame_->Detach(FrameDetachType::kRemove);
|
||||
@@ -165,6 +157,14 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
GetWindowProxyManager()->ClearForSwap();
|
||||
}
|
||||
|
||||
+ // TODO(dcheng): FocusController::FrameDetached() *should* fire JS events,
|
||||
+ // hence the above check for `client_` being null. However, when this was
|
||||
+ // previously placed before the `FrameDetached()` call, nothing crashes, which
|
||||
+ // is suspicious. Investigate if we really don't need to fire JS events--and
|
||||
+ // if we don't, move `forbid_scripts` up to be instantiated sooner and
|
||||
+ // simplify this code.
|
||||
+ ScriptForbiddenScope forbid_scripts;
|
||||
+
|
||||
// After this, we must no longer talk to the client since this clears
|
||||
// its owning reference back to our owning LocalFrame.
|
||||
client_->Detached(type);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 235d2b2ae975974daa33c72ef6767ba1ae3d3776..21247ac3539a80badd7c3f7821961492beeba6bf 100644
|
||||
index bc44c0826be2b7b780b980ddf33285090e0278fb..59bcf6963ba53506d2324a782a18993d374de31a 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -646,10 +646,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -627,10 +627,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
|
@ -26,16 +61,17 @@ index 235d2b2ae975974daa33c72ef6767ba1ae3d3776..21247ac3539a80badd7c3f7821961492
|
|||
- // - Document::Shutdown() can dispose plugins which can run script.
|
||||
- ScriptForbiddenScope forbid_script;
|
||||
if (!Client())
|
||||
return;
|
||||
return false;
|
||||
|
||||
@@ -668,6 +664,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
@@ -666,6 +662,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
// Notify WindowProxyManager that the frame is closing, since its cleanup ends
|
||||
// up calling back to LocalFrameClient via WindowProxy.
|
||||
GetWindowProxyManager()->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());
|
||||
SetView(nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue