Title: [224907] trunk/Source/WTF
Revision
224907
Author
achristen...@apple.com
Date
2017-11-15 16:36:30 -0800 (Wed, 15 Nov 2017)

Log Message

Fix fast/events/message-port-postMessage-recursive.html after r224896
https://bugs.webkit.org/show_bug.cgi?id=179749

Reviewed by Jer Noble.

* wtf/mac/MainThreadMac.mm:
(WTF::currentRunLoopInCommonMode):
We sometimes run the runloop in kCFRunLoopDefaultMode, which should also have the responsiveness optimization.
This allows the runloop to continue to iterate when we are doing lots of things on the main thread.
CFRunLoop.h has a special definition of these two constants.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (224906 => 224907)


--- trunk/Source/WTF/ChangeLog	2017-11-16 00:31:00 UTC (rev 224906)
+++ trunk/Source/WTF/ChangeLog	2017-11-16 00:36:30 UTC (rev 224907)
@@ -1,5 +1,18 @@
 2017-11-15  Alex Christensen  <achristen...@webkit.org>
 
+        Fix fast/events/message-port-postMessage-recursive.html after r224896
+        https://bugs.webkit.org/show_bug.cgi?id=179749
+
+        Reviewed by Jer Noble.
+
+        * wtf/mac/MainThreadMac.mm:
+        (WTF::currentRunLoopInCommonMode):
+        We sometimes run the runloop in kCFRunLoopDefaultMode, which should also have the responsiveness optimization.
+        This allows the runloop to continue to iterate when we are doing lots of things on the main thread.
+        CFRunLoop.h has a special definition of these two constants.
+
+2017-11-15  Alex Christensen  <achristen...@webkit.org>
+
         WebViews scheduled in custom run loop modes should be able to do more than 50ms of work at a time
         https://bugs.webkit.org/show_bug.cgi?id=179742
         <rdar://problem/35519421>

Modified: trunk/Source/WTF/wtf/mac/MainThreadMac.mm (224906 => 224907)


--- trunk/Source/WTF/wtf/mac/MainThreadMac.mm	2017-11-16 00:31:00 UTC (rev 224906)
+++ trunk/Source/WTF/wtf/mac/MainThreadMac.mm	2017-11-16 00:36:30 UTC (rev 224907)
@@ -124,7 +124,9 @@
 
 bool currentRunLoopInCommonMode()
 {
-    return [[NSRunLoop currentRunLoop] currentMode] == (NSString *)kCFRunLoopCommonModes;
+    NSString *currentMode = [[NSRunLoop currentRunLoop] currentMode];
+    return currentMode == (NSString *)kCFRunLoopCommonModes
+        || currentMode == (NSString *)kCFRunLoopDefaultMode;
 }
 
 void scheduleDispatchFunctionsOnMainThread(SchedulePairHashSet* pairs)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to