Title: [249557] trunk
Revision
249557
Author
cdu...@apple.com
Date
2019-09-05 18:07:01 -0700 (Thu, 05 Sep 2019)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (249556 => 249557)


--- trunk/Source/WebKit/ChangeLog	2019-09-06 00:03:52 UTC (rev 249556)
+++ trunk/Source/WebKit/ChangeLog	2019-09-06 01:07:01 UTC (rev 249557)
@@ -1,3 +1,17 @@
+2019-09-05  Chris Dumez  <cdu...@apple.com>
+
+        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.
+
+        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:
+
 2019-09-05  Sihui Liu  <sihui_...@apple.com>
 
         Remove StorageArea pointers in StorageManagerSet when removing StorageManagers that own them

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp (249556 => 249557)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp	2019-09-06 00:03:52 UTC (rev 249556)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp	2019-09-06 01:07:01 UTC (rev 249557)
@@ -724,6 +724,11 @@
         *returnRetainedDataRef = WebKit::toAPI(returnData.leakRef());
 }
 
+bool WKBundlePageIsSuspended(WKBundlePageRef pageRef)
+{
+    return WebKit::toImpl(pageRef)->isSuspended();
+}
+
 void WKBundlePageAddUserScript(WKBundlePageRef pageRef, WKStringRef source, _WKUserScriptInjectionTime injectionTime, WKUserContentInjectedFrames injectedFrames)
 {
     WebKit::toImpl(pageRef)->addUserScript(WebKit::toWTFString(source), WebKit::toUserContentInjectedFrames(injectedFrames), WebKit::toUserScriptInjectionTime(injectionTime));

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h (249556 => 249557)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h	2019-09-06 00:03:52 UTC (rev 249556)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h	2019-09-06 01:07:01 UTC (rev 249557)
@@ -105,6 +105,8 @@
 
 WK_EXPORT void WKBundlePageInsertNewlineInQuotedContent(WKBundlePageRef page);
 
+WK_EXPORT bool WKBundlePageIsSuspended(WKBundlePageRef page);
+
 // This only works if the SuppressesIncrementalRendering preference is set as well.
 typedef unsigned WKRenderingSuppressionToken;
 WK_EXPORT WKRenderingSuppressionToken WKBundlePageExtendIncrementalRenderingSuppression(WKBundlePageRef);

Modified: trunk/Tools/ChangeLog (249556 => 249557)


--- trunk/Tools/ChangeLog	2019-09-06 00:03:52 UTC (rev 249556)
+++ trunk/Tools/ChangeLog	2019-09-06 01:07:01 UTC (rev 249557)
@@ -1,3 +1,19 @@
+2019-09-05  Chris Dumez  <cdu...@apple.com>
+
+        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.
+
+        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):
+
 2019-09-05  Jonathan Bedard  <jbed...@apple.com>
 
         results.webkit.org: Assign notifyRerender before calling

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (249556 => 249557)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2019-09-06 00:03:52 UTC (rev 249556)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2019-09-06 01:07:01 UTC (rev 249557)
@@ -164,7 +164,11 @@
 InjectedBundlePage* InjectedBundle::page() const
 {
     // It might be better to have the UI process send over a reference to the main
-    // page instead of just assuming it's the first one.
+    // page instead of just assuming it's the first non-suspended one.
+    for (auto& page : m_pages) {
+        if (!WKBundlePageIsSuspended(page->page()))
+            return page.get();
+    }
     return m_pages[0].get();
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to