mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 18:17:29 +09:00
[DOM] Be more explicit about the WorkerPrivate self-reference.
This commit is contained in:
parent
daa57bddf7
commit
04fdc6e681
1 changed files with 5 additions and 2 deletions
|
|
@ -4339,6 +4339,11 @@ WorkerPrivate::Constructor(JSContext* aCx,
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// From this point on (worker thread has been started) we
|
||||||
|
// must keep ourself alive. We can now only be cleared by
|
||||||
|
// ClearSelfAndParentEventTargetRef().
|
||||||
|
worker->mSelfRef = worker;
|
||||||
|
|
||||||
worker->EnableDebugger();
|
worker->EnableDebugger();
|
||||||
|
|
||||||
RefPtr<CompileScriptRunnable> compiler =
|
RefPtr<CompileScriptRunnable> compiler =
|
||||||
|
|
@ -4348,8 +4353,6 @@ WorkerPrivate::Constructor(JSContext* aCx,
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
worker->mSelfRef = worker;
|
|
||||||
|
|
||||||
return worker.forget();
|
return worker.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue