Bug 1735266. Call GetExtantDoc instead of GetDoc in CollectFrameTreeData so we don't potentially create a doc where non existed before. r=farre
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 12 Oct 2021 08:47:28 +0000
changeset 595449 b94ac1d5d704a51b707956854f9508bfe52f3402
parent 595448 6de8d791402fcb40a6af90f87e2e6867d936b3a7
child 595450 b20fc3c89cf871b8237af299cb6075ccafce1b30
push id38871
push usernerli@mozilla.com
push dateTue, 12 Oct 2021 21:40:32 +0000
treeherdermozilla-central@691a703f1fa2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfarre
bugs1735266, 1725569
milestone95.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1735266. Call GetExtantDoc instead of GetDoc in CollectFrameTreeData so we don't potentially create a doc where non existed before. r=farre See https://bugzilla.mozilla.org/show_bug.cgi?id=1725569#c18 for how this causes a test to fail. Differential Revision: https://phabricator.services.mozilla.com/D128155
toolkit/components/sessionstore/SessionStoreUtils.cpp
--- a/toolkit/components/sessionstore/SessionStoreUtils.cpp
+++ b/toolkit/components/sessionstore/SessionStoreUtils.cpp
@@ -1342,17 +1342,17 @@ static void CollectFrameTreeData(JSConte
     return;
   }
 
   nsPIDOMWindowOuter* window = aBrowsingContext->GetDOMWindow();
   if (!window || !window->GetDocShell()) {
     return;
   }
 
-  Document* document = window->GetDoc();
+  Document* document = window->GetExtantDoc();
   if (!document) {
     return;
   }
 
   /* Collect data from current frame */
   aFunc(aCx, *document, aRetVal);
 
   /* Collect data from all child frame */