More occasional crashes in ServicesController::resfreshExistingServices
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Aug 2014 21:32:40 +0000 (21:32 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Aug 2014 21:32:40 +0000 (21:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136387
<rdar://problem/18167200>

Reviewed by Dan Bernstein.

* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::ServicesController):
Speculative fix; if this block is called synchronously, we'll end up
calling back into ::shared() before the NeverDestroyed is initialized,
ending up with two ServicesControllers.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/ServicesController.mm

index 1a8047e20ee2de8f0c625f2fb5391ac55431072f..4d065c8475441dd1b5fa5a41346ac9bfdec0c921 100644 (file)
@@ -1,3 +1,17 @@
+2014-08-29  Tim Horton  <timothy_horton@apple.com>
+
+        More occasional crashes in ServicesController::resfreshExistingServices
+        https://bugs.webkit.org/show_bug.cgi?id=136387
+        <rdar://problem/18167200>
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/mac/ServicesController.mm:
+        (WebKit::ServicesController::ServicesController):
+        Speculative fix; if this block is called synchronously, we'll end up
+        calling back into ::shared() before the NeverDestroyed is initialized,
+        ending up with two ServicesControllers.
+
 2014-08-29  Alexey Proskuryakov  <ap@apple.com>
 
         WebPageProxy::close() is a no-op for terminated processes
index 39859aab62e7a04e80c32a71705053076ee2b397..7f1a02b4ad2c66f4c75390c5c72693b4658c36e1 100644 (file)
@@ -98,9 +98,9 @@ ServicesController::ServicesController()
     refreshExistingServices();
 
 #ifdef __LP64__
-    auto refreshCallback = [](NSArray *, NSError *) {
+    auto refreshCallback = [this](NSArray *, NSError *) {
         // We coalese refreshes from the notification callbacks because they can come in small batches.
-        ServicesController::shared().refreshExistingServices(false);
+        refreshExistingServices(false);
     };
 
     auto extensionAttributes = @{ @"NSExtensionPointName" : @"com.apple.services" };