mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1744025: Restore original naming of local WP variable in AutoSyncLoopHolder::Run r=dom-worker-reviewers,smaug
In an intermediate version of D132710 we wanted to use RefPtr and in AutoSyncLoopHolder::Run the local WP variable would have kept alive the WorkerPrivate during the sync loop. But downgrading for now to CheckedUnsafePtr does not give us any lifecycle guarantees here anymore, so the naming was inappropriate. Differential Revision: https://phabricator.services.mozilla.com/D137104
This commit is contained in:
parent
6812f3c9e4
commit
27dca788f6
@ -1469,12 +1469,12 @@ class AutoSyncLoopHolder {
|
||||
}
|
||||
|
||||
bool Run() {
|
||||
CheckedUnsafePtr<WorkerPrivate> keepAliveWP = mWorkerPrivate;
|
||||
CheckedUnsafePtr<WorkerPrivate> workerPrivate = mWorkerPrivate;
|
||||
mWorkerPrivate = nullptr;
|
||||
|
||||
keepAliveWP->AssertIsOnWorkerThread();
|
||||
workerPrivate->AssertIsOnWorkerThread();
|
||||
|
||||
return keepAliveWP->RunCurrentSyncLoop();
|
||||
return workerPrivate->RunCurrentSyncLoop();
|
||||
}
|
||||
|
||||
nsIEventTarget* GetEventTarget() const {
|
||||
|
Loading…
Reference in New Issue
Block a user