Bug 196476

Summary: Resurrect and fix layout test http/tests/adClickAttribution/store-ad-click-attribution.html
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, ews-watchlist, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=194510
Attachments:
Description Flags
Patch
none
Patch none

Description Alex Christensen 2019-04-01 18:56:33 PDT
Resurrect and fix layout test http/tests/adClickAttribution/store-ad-click-attribution.html
Comment 1 Alex Christensen 2019-04-01 19:51:19 PDT
Created attachment 366459 [details]
Patch
Comment 2 EWS Watchlist 2019-04-01 19:54:34 PDT
Attachment 366459 [details] did not pass style-queue:


ERROR: LayoutTests/ChangeLog:9:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Chris Dumez 2019-04-02 09:31:09 PDT
Comment on attachment 366459 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366459&action=review

> Source/WebKit/WebProcess/WebPage/WebFrame.cpp:282
> +        m_ignoreDestroyNavigationMessage = true;

In WebPageProxy::didDestroyNavigation(uint64_t navigationID), I had added the following code to address this issue:
    // 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;

Any idea why this did not suffice?
Comment 4 Alex Christensen 2019-04-02 11:25:07 PDT
At that point m_provisionalPage is null because it has been set to null by WebPageProxy::commitProvisionalPage.  I think it might be a race condition between the old page finishing stopping all loads and the new page committing the provisional load.  This test reliably hits the race condition so that it asserts.  This is a bug in our PSON code.
Comment 5 Chris Dumez 2019-04-02 11:40:19 PDT
Comment on attachment 366459 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366459&action=review

>> Source/WebKit/WebProcess/WebPage/WebFrame.cpp:282
>> +        m_ignoreDestroyNavigationMessage = true;
> 
> In WebPageProxy::didDestroyNavigation(uint64_t navigationID), I had added the following code to address this issue:
>     // 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;
> 
> Any idea why this did not suffice?

We should probably drop my UI-side code at the same time then if your way is better / more robust.
Comment 6 Alex Christensen 2019-04-02 11:43:37 PDT
I put the part of this that is specific to the PSON bug in https://bugs.webkit.org/show_bug.cgi?id=196503 and I'll add the code back to WebPageProxy::didCommitLoadForFrame and update the test expectations in a separate patch after that has landed to give that the possibility of being merged onto a branch without including pieces of unused features.
Comment 7 Alex Christensen 2019-04-02 16:22:00 PDT
Created attachment 366546 [details]
Patch
Comment 8 John Wilander 2019-04-02 16:44:31 PDT
Comment on attachment 366546 [details]
Patch

LGTM.
Comment 9 John Wilander 2019-04-03 10:02:44 PDT
Chris, looks good to you too?
Comment 10 Chris Dumez 2019-04-03 10:09:30 PDT
Comment on attachment 366546 [details]
Patch

r=me
Comment 11 WebKit Commit Bot 2019-04-03 10:23:39 PDT
Comment on attachment 366546 [details]
Patch

Clearing flags on attachment: 366546

Committed r243809: <https://trac.webkit.org/changeset/243809>
Comment 12 WebKit Commit Bot 2019-04-03 10:23:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Radar WebKit Bug Importer 2019-04-03 10:24:22 PDT
<rdar://problem/49562994>