summaryrefslogtreecommitdiff
path: root/dom/storage/DOMStorageIPC.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-02-09 18:23:27 +0000
committerMoonchild <moonchild@palemoon.org>2022-05-30 08:25:08 +0000
commit0d8cddaa733b1cb1616ecd6014e1f44de07ae8f4 (patch)
treeca0f9f323a0879d7ad8e8bd40e9f6eea344dd76b /dom/storage/DOMStorageIPC.cpp
parenta595fa29a368c24978621fd90400964228b993b3 (diff)
downloaduxp-0d8cddaa733b1cb1616ecd6014e1f44de07ae8f4.tar.gz
[DOM] Clear sinks and block further use after storage observer shutdown.
Diffstat (limited to 'dom/storage/DOMStorageIPC.cpp')
-rw-r--r--dom/storage/DOMStorageIPC.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/dom/storage/DOMStorageIPC.cpp b/dom/storage/DOMStorageIPC.cpp
index 442941a7a0..1cf3463459 100644
--- a/dom/storage/DOMStorageIPC.cpp
+++ b/dom/storage/DOMStorageIPC.cpp
@@ -213,8 +213,10 @@ DOMStorageDBChild::RecvObserve(const nsCString& aTopic,
const nsString& aOriginAttributesPattern,
const nsCString& aOriginScope)
{
- DOMStorageObserver::Self()->Notify(
- aTopic.get(), aOriginAttributesPattern, aOriginScope);
+ DOMStorageObserver* observer = DOMStorageObserver::Self();
+ if (observer) {
+ observer->Notify(aTopic.get(), aOriginAttributesPattern, aOriginScope);
+ }
return true;
}