Bug 1473865 part 1 - Remove unused nsJSUtils::GetStaticScriptContext. r=bz
--- a/dom/base/nsJSUtils.cpp
+++ b/dom/base/nsJSUtils.cpp
@@ -65,26 +65,16 @@ nsJSUtils::GetCallingLocation(JSContext*
nsIScriptGlobalObject *
nsJSUtils::GetStaticScriptGlobal(JSObject* aObj)
{
if (!aObj)
return nullptr;
return xpc::WindowGlobalOrNull(aObj);
}
-nsIScriptContext *
-nsJSUtils::GetStaticScriptContext(JSObject* aObj)
-{
- nsIScriptGlobalObject *nativeGlobal = GetStaticScriptGlobal(aObj);
- if (!nativeGlobal)
- return nullptr;
-
- return nativeGlobal->GetScriptContext();
-}
-
uint64_t
nsJSUtils::GetCurrentlyRunningCodeInnerWindowID(JSContext *aContext)
{
if (!aContext)
return 0;
nsGlobalWindowInner* win = xpc::CurrentWindowOrNull(aContext);
return win ? win->WindowID() : 0;
--- a/dom/base/nsJSUtils.h
+++ b/dom/base/nsJSUtils.h
@@ -41,18 +41,16 @@ public:
uint32_t* aLineno = nullptr,
uint32_t* aColumn = nullptr);
static bool GetCallingLocation(JSContext* aContext, nsAString& aFilename,
uint32_t* aLineno = nullptr,
uint32_t* aColumn = nullptr);
static nsIScriptGlobalObject *GetStaticScriptGlobal(JSObject* aObj);
- static nsIScriptContext *GetStaticScriptContext(JSObject* aObj);
-
/**
* Retrieve the inner window ID based on the given JSContext.
*
* @param JSContext aContext
* The JSContext from which you want to find the inner window ID.
*
* @returns uint64_t the inner window ID.
*/