Occasional thread-safety-related crashes on the ServicesController queue
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Aug 2014 23:58:20 +0000 (23:58 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Aug 2014 23:58:20 +0000 (23:58 +0000)
commit54d26b1ff4021d9f98da82abfa35f25cb899df73
tree0ce388fc2d92e6b7779cb38c2f3570b92772a2c1
parenta290b5da8eee662dd8aba901de81cb3d936d573e
Occasional thread-safety-related crashes on the ServicesController queue
https://bugs.webkit.org/show_bug.cgi?id=136356
<rdar://problem/18045685>

Reviewed by Dan Bernstein.

* UIProcess/mac/ServicesController.mm:
(WebKit::hasCompatibleServicesForItems):
Added. Check directly with NSSharingService if we have any services for the given items.
We should eventually check Viewer and Editor services separately so the Web process can
be smarter about when it shows the overlay, but for now this maintains the existing behavior.

(WebKit::ServicesController::refreshExistingServices):
Make use of hasCompatibleServicesForItems instead of having NSSharingServicePicker construct NSMenus.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/ServicesController.mm