Bug 1735266. Call GetExtantDoc instead of GetDoc in CollectFrameTreeData so we don't potentially create a doc where non existed before. r=farre, a=RyanVM
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 12 Oct 2021 08:47:28 +0000
changeset 663269 a593adb38a7470251bafe57b18c286b9fd7ad538
parent 663268 85b8f606034c8c286a1cec5d45de036b7795ceca
child 663270 f22555d3d4764235c02ab6c75c9abfe2f07d6c09
push id15934
push userryanvm@gmail.com
push dateThu, 14 Oct 2021 18:53:57 +0000
treeherdermozilla-beta@b9ee19e29ac6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfarre, RyanVM
bugs1735266, 1725569
milestone94.0
Bug 1735266. Call GetExtantDoc instead of GetDoc in CollectFrameTreeData so we don't potentially create a doc where non existed before. r=farre, a=RyanVM 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
@@ -1341,17 +1341,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 */