mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
[DOM] Clear sinks and block further use after storage observer shutdown.
This commit is contained in:
parent
9299c2e2ea
commit
bc2aa1f05c
2 changed files with 10 additions and 2 deletions
|
|
@ -90,6 +90,8 @@ DOMStorageObserver::Shutdown()
|
|||
if (!sSelf) {
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
||||
sSelf->mSinks.Clear();
|
||||
|
||||
NS_RELEASE(sSelf);
|
||||
return NS_OK;
|
||||
|
|
@ -123,6 +125,10 @@ DOMStorageObserver::Observe(nsISupports* aSubject,
|
|||
const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
if (NS_WARN_IF(!sSelf)) { // Shutdown took place, so bail.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
|
||||
// Start the thread that opens the database.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue