Bug 631553 - Avoid caching frame scripts during xpcom shutdown. r=smaug a=johnath
authorJosh Matthews <josh@joshmatthews.net>
Wed, 16 Feb 2011 12:11:27 -0500
changeset 63116 5534fbe5e318ccc1c0d4bbb79e7ca231002fee3a
parent 63115 f9e075d85552ca435ad89787ce473e9d8d3f269b
child 63117 2b4767713e826e4934c606be4d30dbb962aeff10
push id19034
push userjosh@joshmatthews.net
push dateSat, 26 Feb 2011 05:55:06 +0000
treeherdermozilla-central@2b4767713e82 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, johnath
bugs631553
milestone2.0b13pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 631553 - Avoid caching frame scripts during xpcom shutdown. r=smaug a=johnath
content/base/src/nsFrameMessageManager.cpp
--- a/content/base/src/nsFrameMessageManager.cpp
+++ b/content/base/src/nsFrameMessageManager.cpp
@@ -608,17 +608,17 @@ nsFrameScriptExecutor::Shutdown()
 
     sScriptCacheCleaner = nsnull;
   }
 }
 
 void
 nsFrameScriptExecutor::LoadFrameScriptInternal(const nsAString& aURL)
 {
-  if (!mGlobal || !mCx) {
+  if (!mGlobal || !mCx || !sCachedScripts) {
     return;
   }
 
   nsFrameScriptExecutorJSObjectHolder* holder = sCachedScripts->Get(aURL);
   if (holder) {
     nsContentUtils::ThreadJSContextStack()->Push(mCx);
     {
       // Need to scope JSAutoRequest to happen after Push but before Pop,