Title: [215699] trunk/Source/WebKit2
Revision
215699
Author
cdu...@apple.com
Date
2017-04-24 15:43:22 -0700 (Mon, 24 Apr 2017)

Log Message

Allow tabs with capturing audio or video to exceed background CPU limit
https://bugs.webkit.org/show_bug.cgi?id=171249
<rdar://problem/31796314>

Reviewed by Geoffrey Garen.

Allow tabs with capturing audio or video to exceed background CPU limit as this
is a legit case of potentially high background CPU use.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (215698 => 215699)


--- trunk/Source/WebKit2/ChangeLog	2017-04-24 22:02:06 UTC (rev 215698)
+++ trunk/Source/WebKit2/ChangeLog	2017-04-24 22:43:22 UTC (rev 215699)
@@ -1,3 +1,17 @@
+2017-04-24  Chris Dumez  <cdu...@apple.com>
+
+        Allow tabs with capturing audio or video to exceed background CPU limit
+        https://bugs.webkit.org/show_bug.cgi?id=171249
+        <rdar://problem/31796314>
+
+        Reviewed by Geoffrey Garen.
+
+        Allow tabs with capturing audio or video to exceed background CPU limit as this
+        is a legit case of potentially high background CPU use.
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::didExceedBackgroundCPULimit):
+
 2017-04-24  Andy Estes  <aes...@apple.com>
 
         Try to fix the 32-bit macOS build.

Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (215698 => 215699)


--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp	2017-04-24 22:02:06 UTC (rev 215698)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp	2017-04-24 22:43:22 UTC (rev 215699)
@@ -1173,6 +1173,11 @@
             RELEASE_LOG(PerformanceLogging, "%p - WebProcessProxy::didExceedBackgroundCPULimit() WebProcess has exceeded the background CPU limit but we are not terminating it because there is audio playing", this);
             return;
         }
+
+        if (page->hasActiveAudioStream() || page->hasActiveVideoStream()) {
+            RELEASE_LOG(PerformanceLogging, "%p - WebProcessProxy::didExceedBackgroundCPULimit() WebProcess has exceeded the background CPU limit but we are not terminating it because it is capturing audio / video", this);
+            return;
+        }
     }
 
     RELEASE_LOG(PerformanceLogging, "%p - WebProcessProxy::didExceedBackgroundCPULimit() Terminating background WebProcess that has exceeded the background CPU limit", this);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to