diff --git a/toolkit/components/extensions/webidl-api/ExtensionEventListener.h b/toolkit/components/extensions/webidl-api/ExtensionEventListener.h index 572162536620..4cc95777bce9 100644 --- a/toolkit/components/extensions/webidl-api/ExtensionEventListener.h +++ b/toolkit/components/extensions/webidl-api/ExtensionEventListener.h @@ -155,7 +155,8 @@ class ExtensionListenerCallWorkerRunnable : public dom::WorkerRunnable { private: ~ExtensionListenerCallWorkerRunnable() { - NS_ReleaseOnMainThread(mPromiseResult.forget()); + NS_ReleaseOnMainThread("~ExtensionListenerCallWorkerRunnable", + mPromiseResult.forget()); ReleaseArgsHolder(); mListener = nullptr; } diff --git a/xpcom/threads/nsProxyRelease.h b/xpcom/threads/nsProxyRelease.h index c27722f6264c..69114fbce353 100644 --- a/xpcom/threads/nsProxyRelease.h +++ b/xpcom/threads/nsProxyRelease.h @@ -185,13 +185,6 @@ inline NS_HIDDEN_(void) NS_ProxyRelease(aName, target, doomed.forget(), aAlwaysProxy); } -template -inline NS_HIDDEN_(void) NS_ReleaseOnMainThread(already_AddRefed aDoomed, - bool aAlwaysProxy = false) { - NS_ReleaseOnMainThread("NS_ReleaseOnMainThread", std::move(aDoomed), - aAlwaysProxy); -} - /** * Class to safely handle main-thread-only pointers off the main thread. *