Title: [239802] branches/safari-607-branch/Source/WebCore
Revision
239802
Author
alanc...@apple.com
Date
2019-01-09 17:38:17 -0800 (Wed, 09 Jan 2019)

Log Message

Cherry-pick r239715. rdar://problem/47158638

    Crash in SWServer::Connection::resolveRegistrationReadyRequests
    https://bugs.webkit.org/show_bug.cgi?id=193217

    Reviewed by Chris Dumez.

    As can be seen from the traces, SWServer might clear its connections HashMap in its destructor.
    This might then trigger calling SWServer::resolveRegistrationReadyRequests.
    This method is iterating on the connections HashMap which is being cleared.
    To remove this problem, move the HashMap in a temporary variable and clear the temporary variable.

    * workers/service/server/SWServer.cpp:
    (WebCore::SWServer::~SWServer):

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

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (239801 => 239802)


--- branches/safari-607-branch/Source/WebCore/ChangeLog	2019-01-10 01:38:14 UTC (rev 239801)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog	2019-01-10 01:38:17 UTC (rev 239802)
@@ -1,5 +1,40 @@
 2019-01-09  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r239715. rdar://problem/47158638
+
+    Crash in SWServer::Connection::resolveRegistrationReadyRequests
+    https://bugs.webkit.org/show_bug.cgi?id=193217
+    
+    Reviewed by Chris Dumez.
+    
+    As can be seen from the traces, SWServer might clear its connections HashMap in its destructor.
+    This might then trigger calling SWServer::resolveRegistrationReadyRequests.
+    This method is iterating on the connections HashMap which is being cleared.
+    To remove this problem, move the HashMap in a temporary variable and clear the temporary variable.
+    
+    * workers/service/server/SWServer.cpp:
+    (WebCore::SWServer::~SWServer):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-01-07  Youenn Fablet  <you...@apple.com>
+
+            Crash in SWServer::Connection::resolveRegistrationReadyRequests
+            https://bugs.webkit.org/show_bug.cgi?id=193217
+
+            Reviewed by Chris Dumez.
+
+            As can be seen from the traces, SWServer might clear its connections HashMap in its destructor.
+            This might then trigger calling SWServer::resolveRegistrationReadyRequests.
+            This method is iterating on the connections HashMap which is being cleared.
+            To remove this problem, move the HashMap in a temporary variable and clear the temporary variable.
+
+            * workers/service/server/SWServer.cpp:
+            (WebCore::SWServer::~SWServer):
+
+2019-01-09  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r239711. rdar://problem/47158701
 
     REGRESSION (r239519): ASSERTION FAILED: !m_adoptionIsRequired in com.apple.WebCore: void WTF::refIfNotNull<WebCore::CDMSessionMediaSourceAVFObjC> + 53

Modified: branches/safari-607-branch/Source/WebCore/workers/service/server/SWServer.cpp (239801 => 239802)


--- branches/safari-607-branch/Source/WebCore/workers/service/server/SWServer.cpp	2019-01-10 01:38:14 UTC (rev 239801)
+++ branches/safari-607-branch/Source/WebCore/workers/service/server/SWServer.cpp	2019-01-10 01:38:17 UTC (rev 239802)
@@ -66,7 +66,8 @@
 {
     // Destroy the remaining connections before the SWServer gets destroyed since they have a raw pointer
     // to the server and since they try to unregister clients from the server in their destructor.
-    m_connections.clear();
+    auto connections = WTFMove(m_connections);
+    connections.clear();
 
     allServers().remove(this);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to