Title: [222231] branches/safari-604-branch/Source/WebCore
Revision
222231
Author
[email protected]
Date
2017-09-19 15:25:50 -0700 (Tue, 19 Sep 2017)

Log Message

Cherry-pick r222163. rdar://problem/34508516

Modified Paths

Diff

Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (222230 => 222231)


--- branches/safari-604-branch/Source/WebCore/ChangeLog	2017-09-19 22:25:47 UTC (rev 222230)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog	2017-09-19 22:25:50 UTC (rev 222231)
@@ -1,5 +1,26 @@
 2017-09-19  Jason Marcell  <[email protected]>
 
+        Cherry-pick r222163. rdar://problem/34508516
+
+    2017-09-18  Per Arne Vollan  <[email protected]>
+
+            [WK1] Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing.
+            https://bugs.webkit.org/show_bug.cgi?id=177071
+
+            Reviewed by Brent Fulgham.
+
+            The Page pointer in the history controller's frame is null. Add a null pointer check before
+            accessing the page.
+
+            No new tests, covered by exiting tests.
+
+            * loader/HistoryController.cpp:
+            (WebCore::HistoryController::updateForStandardLoad):
+            (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
+            (WebCore::HistoryController::updateForClientRedirect):
+
+2017-09-19  Jason Marcell  <[email protected]>
+
         Cherry-pick r222114. rdar://problem/34508510
 
     2017-09-15  Wenson Hsieh  <[email protected]>

Modified: branches/safari-604-branch/Source/WebCore/loader/HistoryController.cpp (222230 => 222231)


--- branches/safari-604-branch/Source/WebCore/loader/HistoryController.cpp	2017-09-19 22:25:47 UTC (rev 222230)
+++ branches/safari-604-branch/Source/WebCore/loader/HistoryController.cpp	2017-09-19 22:25:50 UTC (rev 222231)
@@ -381,7 +381,7 @@
 
     FrameLoader& frameLoader = m_frame.loader();
 
-    bool needPrivacy = m_frame.page()->usesEphemeralSession();
+    bool needPrivacy = m_frame.page() ? m_frame.page()->usesEphemeralSession() : true;
     const URL& historyURL = frameLoader.documentLoader()->urlForHistory();
 
     if (!frameLoader.documentLoader()->isClientRedirect()) {
@@ -415,7 +415,7 @@
 {
     LOG(History, "HistoryController %p updateForRedirectWithLockedBackForwardList: Updating History for redirect load in frame %p (main frame %d) %s", this, &m_frame, m_frame.isMainFrame(), m_frame.loader().documentLoader() ? m_frame.loader().documentLoader()->url().string().utf8().data() : "");
     
-    bool needPrivacy = m_frame.page()->usesEphemeralSession();
+    bool needPrivacy = m_frame.page() ? m_frame.page()->usesEphemeralSession() : true;
     const URL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
 
     if (m_frame.loader().documentLoader()->isClientRedirect()) {
@@ -460,7 +460,7 @@
         m_currentItem->clearScrollPosition();
     }
 
-    bool needPrivacy = m_frame.page()->usesEphemeralSession();
+    bool needPrivacy = m_frame.page() ? m_frame.page()->usesEphemeralSession() : true;
     const URL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
 
     if (!historyURL.isEmpty() && !needPrivacy) {
@@ -549,13 +549,13 @@
     if (m_frame.document()->url().isEmpty())
         return;
 
-    if (m_frame.page()->usesEphemeralSession())
-        return;
-
     Page* page = m_frame.page();
     if (!page)
         return;
 
+    if (page->usesEphemeralSession())
+        return;
+
     addVisitedLink(*page, m_frame.document()->url());
     m_frame.mainFrame().loader().history().recursiveUpdateForSameDocumentNavigation();
 
@@ -893,10 +893,10 @@
     m_currentItem->setFormData(nullptr);
     m_currentItem->setFormContentType(String());
 
+    ASSERT(m_frame.page());
     if (m_frame.page()->usesEphemeralSession())
         return;
 
-    ASSERT(m_frame.page());
     addVisitedLink(*m_frame.page(), URL(ParsedURLString, urlString));
     m_frame.loader().client().updateGlobalHistory();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to