Changeset 249557 in webkit


Ignore:
Timestamp:
Sep 5, 2019 6:07:01 PM (5 years ago)
Author:
Chris Dumez
Message:

REGRESSION: http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html and http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html are flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=201440
<rdar://problem/54998427>

Reviewed by Alex Christensen.

Source/WebKit:

Add private WKBundlePage API to query if the WebPage is currently suspended or not.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageIsSuspended):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

Since r249350, it is now possible for a WebContent process to have a suspended WebPage for the current web view.
This was confusing InjectedBundle::page() in WebKitTestRunner which was assuming that the WebPage that was first
created in the WebContent process is the one that is currently running the test and that we want to talk to.
Update InjectedBundle::page() to ignore suspended WebPages in order to address the issue.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::page const):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r249533 r249557  
     12019-09-05  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION: http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html and http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html are flaky timeouts
     4        https://bugs.webkit.org/show_bug.cgi?id=201440
     5        <rdar://problem/54998427>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Add private WKBundlePage API to query if the WebPage is currently suspended or not.
     10
     11        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
     12        (WKBundlePageIsSuspended):
     13        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
     14
    1152019-09-05  Sihui Liu  <sihui_liu@apple.com>
    216
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp

    r248846 r249557  
    725725}
    726726
     727bool WKBundlePageIsSuspended(WKBundlePageRef pageRef)
     728{
     729    return WebKit::toImpl(pageRef)->isSuspended();
     730}
     731
    727732void WKBundlePageAddUserScript(WKBundlePageRef pageRef, WKStringRef source, _WKUserScriptInjectionTime injectionTime, WKUserContentInjectedFrames injectedFrames)
    728733{
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h

    r244675 r249557  
    106106WK_EXPORT void WKBundlePageInsertNewlineInQuotedContent(WKBundlePageRef page);
    107107
     108WK_EXPORT bool WKBundlePageIsSuspended(WKBundlePageRef page);
     109
    108110// This only works if the SuppressesIncrementalRendering preference is set as well.
    109111typedef unsigned WKRenderingSuppressionToken;
  • trunk/Tools/ChangeLog

    r249554 r249557  
     12019-09-05  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION: http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html and http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html are flaky timeouts
     4        https://bugs.webkit.org/show_bug.cgi?id=201440
     5        <rdar://problem/54998427>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Since r249350, it is now possible for a WebContent process to have a suspended WebPage for the current web view.
     10        This was confusing InjectedBundle::page() in WebKitTestRunner which was assuming that the WebPage that was first
     11        created in the WebContent process is the one that is currently running the test and that we want to talk to.
     12        Update InjectedBundle::page() to ignore suspended WebPages in order to address the issue.
     13
     14        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     15        (WTR::InjectedBundle::page const):
     16
    1172019-09-05  Jonathan Bedard  <jbedard@apple.com>
    218
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r248846 r249557  
    165165{
    166166    // It might be better to have the UI process send over a reference to the main
    167     // page instead of just assuming it's the first one.
     167    // page instead of just assuming it's the first non-suspended one.
     168    for (auto& page : m_pages) {
     169        if (!WKBundlePageIsSuspended(page->page()))
     170            return page.get();
     171    }
    168172    return m_pages[0].get();
    169173}
Note: See TracChangeset for help on using the changeset viewer.