Title: [261112] trunk/Source/WebKit
Revision
261112
Author
[email protected]
Date
2020-05-04 14:04:23 -0700 (Mon, 04 May 2020)

Log Message

TestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=211299

Patch by Alex Christensen <[email protected]> on 2020-05-04
Reviewed by Chris Dumez.

Sometimes the task queued in WebProcess::updateProcessName happens after the one in WebProcess::updateActivePages.
Schedule them on the same queue so they happen in deterministic order so we get reliable process names eventually.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::updateActivePages):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (261111 => 261112)


--- trunk/Source/WebKit/ChangeLog	2020-05-04 20:41:51 UTC (rev 261111)
+++ trunk/Source/WebKit/ChangeLog	2020-05-04 21:04:23 UTC (rev 261112)
@@ -1,3 +1,16 @@
+2020-05-04  Alex Christensen  <[email protected]>
+
+        TestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=211299
+
+        Reviewed by Chris Dumez.
+
+        Sometimes the task queued in WebProcess::updateProcessName happens after the one in WebProcess::updateActivePages.
+        Schedule them on the same queue so they happen in deterministic order so we get reliable process names eventually.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::updateActivePages):
+
 2020-05-04  Brent Fulgham  <[email protected]>
 
         Remove unneeded check for Apple Media Services

Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (261111 => 261112)


--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-05-04 20:41:51 UTC (rev 261111)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-05-04 21:04:23 UTC (rev 261112)
@@ -672,11 +672,11 @@
     if (!overrideDisplayName) {
         auto activeOrigins = activePagesOrigins(m_pageMap);
 
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), [activeOrigins = WTFMove(activeOrigins)] {
+        dispatch_async(dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0), [activeOrigins = WTFMove(activeOrigins)] {
             _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), CFSTR("LSActivePageUserVisibleOriginsKey"), (__bridge CFArrayRef)activeOrigins.get(), nullptr);
         });
     } else {
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        dispatch_async(dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0), ^{
             _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, overrideDisplayName.createCFString().get(), nullptr);
         });
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to