diff --git a/mozilla/dom/src/storage/nsDOMStorage.cpp b/mozilla/dom/src/storage/nsDOMStorage.cpp index 50429b22bf9..1b7bfe4550d 100644 --- a/mozilla/dom/src/storage/nsDOMStorage.cpp +++ b/mozilla/dom/src/storage/nsDOMStorage.cpp @@ -146,6 +146,14 @@ nsDOMStorageManager::Initialize() return NS_OK; } +//static +void +nsDOMStorageManager::Shutdown() +{ + NS_IF_RELEASE(gStorageManager); + gStorageManager = nsnull; +} + PR_STATIC_CALLBACK(PLDHashOperator) ClearStorage(nsDOMStorageEntry* aEntry, void* userArg) { diff --git a/mozilla/dom/src/storage/nsDOMStorage.h b/mozilla/dom/src/storage/nsDOMStorage.h index f01240a70ba..76ed8beab35 100644 --- a/mozilla/dom/src/storage/nsDOMStorage.h +++ b/mozilla/dom/src/storage/nsDOMStorage.h @@ -95,6 +95,7 @@ public: nsresult ClearAllStorages(); static nsresult Initialize(); + static void Shutdown(); static nsDOMStorageManager* gStorageManager; diff --git a/mozilla/layout/build/nsLayoutStatics.cpp b/mozilla/layout/build/nsLayoutStatics.cpp index a5459ee05ac..7986c7fa1d6 100644 --- a/mozilla/layout/build/nsLayoutStatics.cpp +++ b/mozilla/layout/build/nsLayoutStatics.cpp @@ -191,6 +191,7 @@ nsLayoutStatics::Initialize() void nsLayoutStatics::Shutdown() { + nsDOMStorageManager::Shutdown(); txXSLTProcessor::shutdown(); nsDOMAttribute::Shutdown(); nsDOMEventRTTearoff::Shutdown();