mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
[DOM] Drop mWrappedRunnable early in workers.
This should prevent some intermittent crashes.
This commit is contained in:
parent
e4d635f889
commit
aae5866390
1 changed files with 2 additions and 0 deletions
|
|
@ -241,6 +241,7 @@ private:
|
|||
WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
|
||||
{
|
||||
nsresult rv = mWrappedRunnable->Run();
|
||||
mWrappedRunnable = nullptr;
|
||||
if (NS_FAILED(rv)) {
|
||||
if (!JS_IsExceptionPending(aCx)) {
|
||||
Throw(aCx, rv);
|
||||
|
|
@ -259,6 +260,7 @@ private:
|
|||
MOZ_ASSERT(cancelable); // We checked this earlier!
|
||||
rv = cancelable->Cancel();
|
||||
nsresult rv2 = WorkerRunnable::Cancel();
|
||||
mWrappedRunnable = nullptr;
|
||||
return NS_FAILED(rv) ? rv : rv2;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue