Title: [197914] trunk/Source/WebKit2
Revision
197914
Author
[email protected]
Date
2016-03-09 17:55:34 -0800 (Wed, 09 Mar 2016)

Log Message

Last opened tab does not receive SetHiddenPageTimerThrottlingIncreaseLimit message
https://bugs.webkit.org/show_bug.cgi?id=155126

Reviewed by Anders Carlson.

WebPageProxy will increment the hidden page throttling counter from within its constructor,
which currently causes the WebProcessPool to try to synchronously message all processes.
The web page triggering the increment then fails to receive the message, since it was
still being constructed. Make the update of the limit async, such that the page is fully
constructed before the WebProcessPool processes the update.

* UIProcess/WebProcessPool.cpp:
(WebKit::m_hiddenPageThrottlingAutoIncreasesCounter):
    - This now schedules a zero-delay timer to handle the update.
(WebKit::m_hiddenPageThrottlingTimer):
    - This is now responsible for calling updateHiddenPageThrottlingAutoIncreaseLimit.
* UIProcess/WebProcessPool.h:
    - Added m_hiddenPageThrottlingTimer.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (197913 => 197914)


--- trunk/Source/WebKit2/ChangeLog	2016-03-10 01:54:36 UTC (rev 197913)
+++ trunk/Source/WebKit2/ChangeLog	2016-03-10 01:55:34 UTC (rev 197914)
@@ -1,3 +1,24 @@
+2016-03-09  Gavin Barraclough  <[email protected]>
+
+        Last opened tab does not receive SetHiddenPageTimerThrottlingIncreaseLimit message
+        https://bugs.webkit.org/show_bug.cgi?id=155126
+
+        Reviewed by Anders Carlson.
+
+        WebPageProxy will increment the hidden page throttling counter from within its constructor,
+        which currently causes the WebProcessPool to try to synchronously message all processes.
+        The web page triggering the increment then fails to receive the message, since it was
+        still being constructed. Make the update of the limit async, such that the page is fully
+        constructed before the WebProcessPool processes the update.
+
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::m_hiddenPageThrottlingAutoIncreasesCounter):
+            - This now schedules a zero-delay timer to handle the update.
+        (WebKit::m_hiddenPageThrottlingTimer):
+            - This is now responsible for calling updateHiddenPageThrottlingAutoIncreaseLimit.
+        * UIProcess/WebProcessPool.h:
+            - Added m_hiddenPageThrottlingTimer.
+
 2016-03-09  David Kilzer  <[email protected]>
 
         REGRESSION (r197149): Missing availability checks when soft-linking DataDetectors.framework

Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (197913 => 197914)


--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp	2016-03-10 01:54:36 UTC (rev 197913)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp	2016-03-10 01:55:34 UTC (rev 197914)
@@ -163,7 +163,8 @@
     , m_memoryCacheDisabled(false)
     , m_userObservablePageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
     , m_processSuppressionDisabledForPageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
-    , m_hiddenPageThrottlingAutoIncreasesCounter([this](RefCounterEvent) { updateHiddenPageThrottlingAutoIncreaseLimit(); })
+    , m_hiddenPageThrottlingAutoIncreasesCounter([this](RefCounterEvent) { m_hiddenPageThrottlingTimer.startOneShot(0); })
+    , m_hiddenPageThrottlingTimer(RunLoop::main(), this, &WebProcessPool::updateHiddenPageThrottlingAutoIncreaseLimit)
 {
     for (auto& scheme : m_configuration->alwaysRevalidatedURLSchemes())
         m_schemesToRegisterAsAlwaysRevalidated.add(scheme);

Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (197913 => 197914)


--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h	2016-03-10 01:54:36 UTC (rev 197913)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h	2016-03-10 01:55:34 UTC (rev 197914)
@@ -522,6 +522,7 @@
     UserObservablePageCounter m_userObservablePageCounter;
     ProcessSuppressionDisabledCounter m_processSuppressionDisabledForPageCounter;
     HiddenPageThrottlingAutoIncreasesCounter m_hiddenPageThrottlingAutoIncreasesCounter;
+    RunLoop::Timer<WebProcessPool> m_hiddenPageThrottlingTimer;
 
 #if PLATFORM(COCOA)
     RetainPtr<NSMutableDictionary> m_bundleParameters;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to