Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika

To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.

Depends on D64390

Differential Revision: https://phabricator.services.mozilla.com/D67631
This commit is contained in:
Andreas Farre
2020-04-07 15:16:23 +00:00
parent 8f3777c8b5
commit c76bc4f1c8
57 changed files with 175 additions and 231 deletions

View File

@@ -2024,10 +2024,10 @@ nsresult ScriptLoader::ProcessOffThreadRequest(ScriptLoadRequest* aRequest) {
NotifyOffThreadScriptLoadCompletedRunnable::
~NotifyOffThreadScriptLoadCompletedRunnable() {
if (MOZ_UNLIKELY(mRequest || mLoader) && !NS_IsMainThread()) {
NS_ReleaseOnMainThreadSystemGroup(
NS_ReleaseOnMainThread(
"NotifyOffThreadScriptLoadCompletedRunnable::mRequest",
mRequest.forget());
NS_ReleaseOnMainThreadSystemGroup(
NS_ReleaseOnMainThread(
"NotifyOffThreadScriptLoadCompletedRunnable::mLoader",
mLoader.forget());
}