diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 83e64263c74..0f359559a08 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -535,6 +535,9 @@ nsWebShell::Embed(nsIContentViewer* aContentViewer, this, aContentViewer, aCommand ? aCommand : "", aExtraInfo)); NS_IF_RELEASE(mContentViewer); + if (nsnull != mScriptContext) { + mScriptContext->GC(); + } mContentViewer = aContentViewer; NS_ADDREF(aContentViewer); diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 83e64263c74..0f359559a08 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -535,6 +535,9 @@ nsWebShell::Embed(nsIContentViewer* aContentViewer, this, aContentViewer, aCommand ? aCommand : "", aExtraInfo)); NS_IF_RELEASE(mContentViewer); + if (nsnull != mScriptContext) { + mScriptContext->GC(); + } mContentViewer = aContentViewer; NS_ADDREF(aContentViewer);