- Revision
- 243767
- Author
- [email protected]
- Date
- 2019-04-02 16:11:43 -0700 (Tue, 02 Apr 2019)
Log Message
Fix assertion in http/tests/adClickAttribution/store-ad-click-attribution.html
https://bugs.webkit.org/show_bug.cgi?id=196503
Reviewed by Chris Dumez.
Source/WebKit:
In WebPageProxy::didDestroyNavigation we try to ignore a request to destroy a navigation from a page being navigated from
during a cross-site navigation, but if the old web process sends the message after WebPageProxy::commitProvisionalPage
has been called, we can still destroy a navigation when we are continuing a navigation in another process. To prevent this,
have the process not send the message when it knows the navigation is continuing in another process.
Also make the use of unchecked navigation pointers more robust by checking it for nullity.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision):
(WebKit::WebFrame::documentLoaderDetached):
* WebProcess/WebPage/WebFrame.h:
LayoutTests:
* http/tests/adClickAttribution/store-ad-click-attribution-expected.txt:
* http/tests/adClickAttribution/store-ad-click-attribution.html:
* platform/wk2/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (243766 => 243767)
--- trunk/LayoutTests/ChangeLog 2019-04-02 23:07:49 UTC (rev 243766)
+++ trunk/LayoutTests/ChangeLog 2019-04-02 23:11:43 UTC (rev 243767)
@@ -1,3 +1,14 @@
+2019-04-02 Alex Christensen <[email protected]>
+
+ Fix assertion in http/tests/adClickAttribution/store-ad-click-attribution.html
+ https://bugs.webkit.org/show_bug.cgi?id=196503
+
+ Reviewed by Chris Dumez.
+
+ * http/tests/adClickAttribution/store-ad-click-attribution-expected.txt:
+ * http/tests/adClickAttribution/store-ad-click-attribution.html:
+ * platform/wk2/TestExpectations:
+
2019-04-02 Devin Rousso <[email protected]>
Web Inspector: Canvas: add support for showing WebGPU contexts
Modified: trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution-expected.txt (243766 => 243767)
--- trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution-expected.txt 2019-04-02 23:07:49 UTC (rev 243766)
+++ trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution-expected.txt 2019-04-02 23:11:43 UTC (rev 243767)
@@ -1,8 +1,4 @@
Tests storage of ad click attribution.
-WebCore::AdClickAttribution 1
-Source: 127.0.0.1
-Destination: localhost
-Campaign ID: 3
-No conversion data.
+No stored Ad Click Attribution data.
\ No newline at end of file
Modified: trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution.html (243766 => 243767)
--- trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution.html 2019-04-02 23:07:49 UTC (rev 243766)
+++ trunk/LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution.html 2019-04-02 23:11:43 UTC (rev 243767)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true, internal:AdClickAttributionEnabled=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:AdClickAttributionEnabled=true ] -->
<html lang="en">
<head>
<meta charset="UTF-8">
Modified: trunk/LayoutTests/platform/wk2/TestExpectations (243766 => 243767)
--- trunk/LayoutTests/platform/wk2/TestExpectations 2019-04-02 23:07:49 UTC (rev 243766)
+++ trunk/LayoutTests/platform/wk2/TestExpectations 2019-04-02 23:11:43 UTC (rev 243767)
@@ -753,7 +753,6 @@
fast/forms/call-text-did-change-in-text-field-when-typing.html [ Pass ]
http/tests/adClickAttribution [ Pass ]
-http/tests/adClickAttribution/store-ad-click-attribution.html [ Skip ]
### END OF (5) Progressions, expected successes that are expected failures in WebKit1.
########################################
Modified: trunk/Source/WebKit/ChangeLog (243766 => 243767)
--- trunk/Source/WebKit/ChangeLog 2019-04-02 23:07:49 UTC (rev 243766)
+++ trunk/Source/WebKit/ChangeLog 2019-04-02 23:11:43 UTC (rev 243767)
@@ -1,3 +1,23 @@
+2019-04-02 Alex Christensen <[email protected]>
+
+ Fix assertion in http/tests/adClickAttribution/store-ad-click-attribution.html
+ https://bugs.webkit.org/show_bug.cgi?id=196503
+
+ Reviewed by Chris Dumez.
+
+ In WebPageProxy::didDestroyNavigation we try to ignore a request to destroy a navigation from a page being navigated from
+ during a cross-site navigation, but if the old web process sends the message after WebPageProxy::commitProvisionalPage
+ has been called, we can still destroy a navigation when we are continuing a navigation in another process. To prevent this,
+ have the process not send the message when it knows the navigation is continuing in another process.
+ Also make the use of unchecked navigation pointers more robust by checking it for nullity.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didCommitLoadForFrame):
+ * WebProcess/WebPage/WebFrame.cpp:
+ (WebKit::WebFrame::didReceivePolicyDecision):
+ (WebKit::WebFrame::documentLoaderDetached):
+ * WebProcess/WebPage/WebFrame.h:
+
2019-04-02 Per Arne Vollan <[email protected]>
[iOS] Fix iokit-get-properties sandbox violation in the WebContent process
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (243766 => 243767)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-04-02 23:07:49 UTC (rev 243766)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-04-02 23:11:43 UTC (rev 243767)
@@ -3873,10 +3873,6 @@
{
PageClientProtector protector(pageClient());
- // On process-swap, the previous process tries to destroy the navigation but the provisional process is actually taking over the navigation.
- if (m_provisionalPage && m_provisionalPage->navigationID() == navigationID)
- return;
-
// FIXME: Message check the navigationID.
m_navigationState->didDestroyNavigation(navigationID);
}
@@ -4106,8 +4102,7 @@
// FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
RefPtr<API::Navigation> navigation;
- if (frame->isMainFrame() && navigationID) {
- navigation = navigationState().navigation(navigationID);
+ if (frame->isMainFrame() && navigationID && (navigation = navigationState().navigation(navigationID))) {
#if ENABLE(RESOURCE_LOAD_STATISTICS)
auto requesterOrigin = navigation->lastNavigationAction().requesterOrigin;
auto currentURL = navigation->currentRequest().url();
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebFrame.cpp (243766 => 243767)
--- trunk/Source/WebKit/WebProcess/WebPage/WebFrame.cpp 2019-04-02 23:07:49 UTC (rev 243766)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebFrame.cpp 2019-04-02 23:11:43 UTC (rev 243767)
@@ -278,6 +278,9 @@
documentLoader->setNavigationID(navigationID);
}
+ if (action == PolicyAction::StopAllLoads)
+ m_navigationIsContinuingInAnotherProcess = true;
+
function(action, identifier);
}
@@ -812,7 +815,9 @@
void WebFrame::documentLoaderDetached(uint64_t navigationID)
{
- if (auto * page = this->page())
+ if (m_navigationIsContinuingInAnotherProcess)
+ return;
+ if (auto* page = this->page())
page->send(Messages::WebPageProxy::DidDestroyNavigation(navigationID));
}
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebFrame.h (243766 => 243767)
--- trunk/Source/WebKit/WebProcess/WebPage/WebFrame.h 2019-04-02 23:07:49 UTC (rev 243766)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebFrame.h 2019-04-02 23:11:43 UTC (rev 243767)
@@ -188,6 +188,7 @@
LoadListener* m_loadListener { nullptr };
uint64_t m_frameID { 0 };
+ bool m_navigationIsContinuingInAnotherProcess { false };
#if PLATFORM(IOS_FAMILY)
uint64_t m_firstLayerTreeTransactionIDAfterDidCommitLoad { 0 };