From 30cca9cb1537f2a67da7b16499fbdfb937c9bd0b Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Fri, 13 Aug 2021 11:19:42 +0200 Subject: [PATCH] Backed out changeset f912045db98d (bug 1706347) for causing content crashes (bug 1725558). a=backout DONTBUILD --- docshell/base/CanonicalBrowsingContext.cpp | 18 ++-------- .../test/navigation/iframe_slow_onload.html | 5 --- .../navigation/iframe_slow_onload_inner.html | 19 ---------- docshell/test/navigation/mochitest.ini | 2 -- .../test/navigation/test_blockBFCache.html | 35 +------------------ dom/base/Document.cpp | 33 ----------------- dom/base/Document.h | 19 ---------- dom/ipc/BrowserBridgeChild.cpp | 15 ++++---- uriloader/base/nsDocLoader.cpp | 10 ++---- uriloader/base/nsDocLoader.h | 29 +++++++++++++-- 10 files changed, 41 insertions(+), 144 deletions(-) delete mode 100644 docshell/test/navigation/iframe_slow_onload.html delete mode 100644 docshell/test/navigation/iframe_slow_onload_inner.html diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp index 5eceea69a982..6970028f2076 100644 --- a/docshell/base/CanonicalBrowsingContext.cpp +++ b/docshell/base/CanonicalBrowsingContext.cpp @@ -2552,25 +2552,11 @@ void CanonicalBrowsingContext::CloneDocumentTreeInto( [source = MaybeDiscardedBrowsingContext{aSource}, data = std::move(aPrintData)]( BrowserParent* aBp) -> RefPtr { - RefPtr bridge = - aBp->GetBrowserBridgeParent(); return aBp->SendCloneDocumentTreeIntoSelf(source, data) ->Then( GetMainThreadSerialEventTarget(), __func__, - [bridge]( - BrowserParent::CloneDocumentTreeIntoSelfPromise:: - ResolveOrRejectValue&& aValue) { - // We're cloning a remote iframe, so we created a - // BrowserBridge which makes us register an OOP load - // (see Document::OOPChildLoadStarted), even though - // this isn't a real load. We call - // SendMaybeFireEmbedderLoadEvents here so that we do - // register the end of the load (see - // Document::OOPChildLoadDone). - if (bridge) { - Unused << bridge->SendMaybeFireEmbedderLoadEvents( - EmbedderElementEventType::NoEvent); - } + [](BrowserParent::CloneDocumentTreeIntoSelfPromise:: + ResolveOrRejectValue&& aValue) { if (aValue.IsResolve() && aValue.ResolveValue()) { return GenericNonExclusivePromise::CreateAndResolve( true, __func__); diff --git a/docshell/test/navigation/iframe_slow_onload.html b/docshell/test/navigation/iframe_slow_onload.html deleted file mode 100644 index e8555699bb35..000000000000 --- a/docshell/test/navigation/iframe_slow_onload.html +++ /dev/null @@ -1,5 +0,0 @@ - - -