Bug 1144660 - Make KeepAliveHandler threadsafe refcounted. r=ehsan

This works because KeepAliveHandler only holds nsMainThreadPtrHolder<> which is
itself thread safe.  It has assertions that the PromiseNativeHandler overrides
are only called on the worker and these assertions are satisfied.

--HG--
extra : commitid : Kqgfb87dkFH
extra : rebase_source : 56371d2993c681d99814535a4b5289330763f9c3
This commit is contained in:
Nikhil Marathe 2015-08-05 20:58:10 -07:00
parent f6bdd4e7a5
commit 744a8d6f14

View File

@ -1622,7 +1622,7 @@ class KeepAliveHandler final : public PromiseNativeHandler
{}
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
explicit KeepAliveHandler(const nsMainThreadPtrHandle<ServiceWorker>& aServiceWorker)
: mServiceWorker(aServiceWorker)