Title: [184679] trunk/Source/WebKit2
Revision
184679
Author
[email protected]
Date
2015-05-20 17:14:00 -0700 (Wed, 20 May 2015)

Log Message

Allow overriding the waitForDidUpdateViewState timeout
https://bugs.webkit.org/show_bug.cgi?id=145230
<rdar://problem/20990162>

Reviewed by Darin Adler.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
Use the value from NSUserDefaults, if it exists.
We'll only check once, so changing the default requires a restart of the UI process.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (184678 => 184679)


--- trunk/Source/WebKit2/ChangeLog	2015-05-21 00:11:27 UTC (rev 184678)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-21 00:14:00 UTC (rev 184679)
@@ -1,3 +1,16 @@
+2015-05-20  Tim Horton  <[email protected]>
+
+        Allow overriding the waitForDidUpdateViewState timeout
+        https://bugs.webkit.org/show_bug.cgi?id=145230
+        <rdar://problem/20990162>
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
+        Use the value from NSUserDefaults, if it exists.
+        We'll only check once, so changing the default requires a restart of the UI process.
+
 2015-05-20  Anders Carlsson  <[email protected]>
 
         Make sure we always have a process pool to perform data store operations with

Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (184678 => 184679)


--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm	2015-05-21 00:11:27 UTC (rev 184678)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm	2015-05-21 00:14:00 UTC (rev 184679)
@@ -393,11 +393,16 @@
 
 void RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState()
 {
+    static std::chrono::milliseconds viewStateUpdateTimeout = [] {
+        if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitOverrideViewStateUpdateTimeout"])
+            return std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::duration<double>([value doubleValue]));
+
 #if PLATFORM(IOS)
-    auto viewStateUpdateTimeout = std::chrono::milliseconds(500);
+        return std::chrono::milliseconds(500);
 #else
-    auto viewStateUpdateTimeout = std::chrono::milliseconds(250);
+        return std::chrono::milliseconds(250);
 #endif
+    }();
     m_webPageProxy.process().connection()->waitForAndDispatchImmediately<Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree>(m_webPageProxy.pageID(), viewStateUpdateTimeout, InterruptWaitingIfSyncMessageArrives);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to