mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1259338 P1 Ensure that AllowWindowInteractionHandler is released on worker thread. r=khuey
This commit is contained in:
parent
f9af648597
commit
13d4638d6c
@ -845,6 +845,15 @@ private:
|
||||
bool
|
||||
WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override;
|
||||
|
||||
NS_IMETHOD
|
||||
Cancel() override
|
||||
{
|
||||
// Always ensure the handler is released on the worker thread, even if we
|
||||
// are cancelled.
|
||||
mHandler = nullptr;
|
||||
return WorkerRunnable::Cancel();
|
||||
}
|
||||
|
||||
RefPtr<AllowWindowInteractionHandler> mHandler;
|
||||
};
|
||||
|
||||
@ -955,6 +964,7 @@ bool
|
||||
ClearWindowAllowedRunnable::WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
|
||||
{
|
||||
mHandler->ClearWindowAllowed(aWorkerPrivate);
|
||||
mHandler = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user