Title: [186969] trunk/Source/WebKit2
Revision
186969
Author
[email protected]
Date
2015-07-17 16:05:27 -0700 (Fri, 17 Jul 2015)

Log Message

REGRESSION (r186964): Crash in WebKit2.CloseFromWithinCreatePage
https://bugs.webkit.org/show_bug.cgi?id=147055

Reviewed by Alex Christensen.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createNewPage): Grab the main frame’s URL before calling out to the
client, who may destroy the frame.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (186968 => 186969)


--- trunk/Source/WebKit2/ChangeLog	2015-07-17 23:01:08 UTC (rev 186968)
+++ trunk/Source/WebKit2/ChangeLog	2015-07-17 23:05:27 UTC (rev 186969)
@@ -1,5 +1,16 @@
 2015-07-17  Dan Bernstein  <[email protected]>
 
+        REGRESSION (r186964): Crash in WebKit2.CloseFromWithinCreatePage
+        https://bugs.webkit.org/show_bug.cgi?id=147055
+
+        Reviewed by Alex Christensen.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::createNewPage): Grab the main frame’s URL before calling out to the
+        client, who may destroy the frame.
+
+2015-07-17  Dan Bernstein  <[email protected]>
+
         WebKit2 part of <rdar://problem/21803781> The external URL policy is not reported correctly in navigation actions that create new windows
         https://bugs.webkit.org/show_bug.cgi?id=147040
 

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (186968 => 186969)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2015-07-17 23:01:08 UTC (rev 186968)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2015-07-17 23:05:27 UTC (rev 186969)
@@ -3526,6 +3526,8 @@
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
 
+    auto mainFrameURL = m_mainFrame->url();
+
     RefPtr<WebPageProxy> newPage = m_uiClient->createNewPage(this, frame, securityOriginData, request, windowFeatures, navigationActionData);
     if (!newPage) {
         newPageID = 0;
@@ -3536,7 +3538,7 @@
     newPageParameters = newPage->creationParameters();
 
     WebsiteDataStore::cloneSessionData(*this, *newPage);
-    newPage->m_shouldSuppressAppLinksInNextNavigationPolicyDecision = protocolHostAndPortAreEqual(URL(ParsedURLString, m_mainFrame->url()), request.url());
+    newPage->m_shouldSuppressAppLinksInNextNavigationPolicyDecision = protocolHostAndPortAreEqual(URL(ParsedURLString, mainFrameURL), request.url());
 }
     
 void WebPageProxy::showPage()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to