diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index f30a2743fee4..4cfd7329bbcd 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -2698,7 +2698,7 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument, newInnerWindow->mChromeEventHandler = mChromeEventHandler; } - mContext->GC(JS::gcreason::SET_NEW_DOCUMENT); + nsJSContext::PokeGC(JS::gcreason::SET_NEW_DOCUMENT); mContext->DidInitializeContext(); // We wait to fire the debugger hook until the window is all set up and hooked @@ -2921,7 +2921,7 @@ nsGlobalWindow::DetachFromDocShell() mChromeEventHandler = nullptr; // force release now if (mContext) { - mContext->GC(JS::gcreason::SET_DOC_SHELL); + nsJSContext::PokeGC(JS::gcreason::SET_DOC_SHELL); mContext = nullptr; } diff --git a/dom/base/nsIScriptContext.h b/dom/base/nsIScriptContext.h index d2bad832ce64..a94acc2af07d 100644 --- a/dom/base/nsIScriptContext.h +++ b/dom/base/nsIScriptContext.h @@ -27,8 +27,8 @@ class nsIDOMWindow; class nsIURI; #define NS_ISCRIPTCONTEXT_IID \ -{ 0x274840b6, 0x7349, 0x4798, \ - { 0xbe, 0x24, 0xbd, 0x75, 0xa6, 0x46, 0x99, 0xb7 } } +{ 0x901f0d5e, 0x217a, 0x45fa, \ + { 0x9a, 0xca, 0x45, 0x0f, 0xe7, 0x2f, 0x10, 0x9a } } class nsIOffThreadScriptReceiver; @@ -67,19 +67,11 @@ public: */ virtual bool IsContextInitialized() = 0; - /** - * For garbage collected systems, do a synchronous collection pass. - * May be a no-op on other systems - * - * @return NS_OK if the method is successful - */ - virtual void GC(JS::gcreason::Reason aReason) = 0; - // SetProperty is suspect and jst believes should not be needed. Currenly // used only for "arguments". virtual nsresult SetProperty(JS::Handle aTarget, const char* aPropName, nsISupports* aVal) = 0; - /** + /** * Called to set/get information if the script context is * currently processing a script tag */ @@ -134,4 +126,3 @@ public: NS_DEFINE_STATIC_IID_ACCESSOR(nsIOffThreadScriptReceiver, NS_IOFFTHREADSCRIPTRECEIVER_IID) #endif // nsIScriptContext_h__ - diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index fafa3d332b72..e427654b22c6 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -2302,12 +2302,6 @@ nsJSContext::KillICCTimer() } } -void -nsJSContext::GC(JS::gcreason::Reason aReason) -{ - PokeGC(aReason); -} - class NotifyGCEndRunnable : public nsRunnable { nsString mMessage; diff --git a/dom/base/nsJSEnvironment.h b/dom/base/nsJSEnvironment.h index d4ae7c33f051..d090549d3604 100644 --- a/dom/base/nsJSEnvironment.h +++ b/dom/base/nsJSEnvironment.h @@ -125,8 +125,6 @@ public: // Calling LikelyShortLivingObjectCreated() makes a GC more likely. static void LikelyShortLivingObjectCreated(); - virtual void GC(JS::gcreason::Reason aReason) MOZ_OVERRIDE; - static uint32_t CleanupsSinceLastGC(); nsIScriptGlobalObject* GetCachedGlobalObject()