Title: [245310] branches/safari-608.1.24-branch/Source/WebKit
Revision
245310
Author
[email protected]
Date
2019-05-14 14:08:02 -0700 (Tue, 14 May 2019)

Log Message

Cherry-pick r245298. rdar://problem/50665984

    Crash under WebKit::WebProcessProxy::didBecomeUnresponsive()
    https://bugs.webkit.org/show_bug.cgi?id=197883
    <rdar://problem/50665984>

    Reviewed by Alex Christensen.

    Protect |this| in didBecomeUnresponsive() and didExceedCPULimit() since we call client
    delegates and those may cause |this| to get destroyed.

    * UIProcess/WebProcessProxy.cpp:
    (WebKit::WebProcessProxy::didBecomeUnresponsive):
    (WebKit::WebProcessProxy::didExceedCPULimit):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245298 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608.1.24-branch/Source/WebKit/ChangeLog (245309 => 245310)


--- branches/safari-608.1.24-branch/Source/WebKit/ChangeLog	2019-05-14 21:07:59 UTC (rev 245309)
+++ branches/safari-608.1.24-branch/Source/WebKit/ChangeLog	2019-05-14 21:08:02 UTC (rev 245310)
@@ -1,5 +1,39 @@
 2019-05-14  Alan Coon  <[email protected]>
 
+        Cherry-pick r245298. rdar://problem/50665984
+
+    Crash under WebKit::WebProcessProxy::didBecomeUnresponsive()
+    https://bugs.webkit.org/show_bug.cgi?id=197883
+    <rdar://problem/50665984>
+    
+    Reviewed by Alex Christensen.
+    
+    Protect |this| in didBecomeUnresponsive() and didExceedCPULimit() since we call client
+    delegates and those may cause |this| to get destroyed.
+    
+    * UIProcess/WebProcessProxy.cpp:
+    (WebKit::WebProcessProxy::didBecomeUnresponsive):
+    (WebKit::WebProcessProxy::didExceedCPULimit):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-05-14  Chris Dumez  <[email protected]>
+
+            Crash under WebKit::WebProcessProxy::didBecomeUnresponsive()
+            https://bugs.webkit.org/show_bug.cgi?id=197883
+            <rdar://problem/50665984>
+
+            Reviewed by Alex Christensen.
+
+            Protect |this| in didBecomeUnresponsive() and didExceedCPULimit() since we call client
+            delegates and those may cause |this| to get destroyed.
+
+            * UIProcess/WebProcessProxy.cpp:
+            (WebKit::WebProcessProxy::didBecomeUnresponsive):
+            (WebKit::WebProcessProxy::didExceedCPULimit):
+
+2019-05-14  Alan Coon  <[email protected]>
+
         Cherry-pick r245294. rdar://problem/50698499
 
     Update TBA macros for API / SPI that has already shipped

Modified: branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp (245309 => 245310)


--- branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp	2019-05-14 21:07:59 UTC (rev 245309)
+++ branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp	2019-05-14 21:08:02 UTC (rev 245310)
@@ -713,6 +713,8 @@
 
 void WebProcessProxy::didBecomeUnresponsive()
 {
+    auto protectedThis = makeRef(*this);
+
     m_isResponsive = NoOrMaybe::No;
 
     auto isResponsiveCallbacks = WTFMove(m_isResponsiveCallbacks);
@@ -1314,6 +1316,8 @@
 
 void WebProcessProxy::didExceedCPULimit()
 {
+    auto protectedThis = makeRef(*this);
+
     for (auto& page : pages()) {
         if (page->isPlayingAudio()) {
             RELEASE_LOG(PerformanceLogging, "%p - WebProcessProxy::didExceedCPULimit() WebProcess with pid %d has exceeded the background CPU limit but we are not terminating it because there is audio playing", this, processIdentifier());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to