зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1276276 part 3. Eliminate nsIScriptContext::GetNativeContext. r=smaug
This commit is contained in:
Родитель
43a4676066
Коммит
f02f5d431d
|
@ -2243,7 +2243,7 @@ public:
|
|||
NS_DECLARE_STATIC_IID_ACCESSOR(WINDOWSTATEHOLDER_IID)
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
WindowStateHolder(nsIScriptContext* aContext, nsGlobalWindow *aWindow);
|
||||
explicit WindowStateHolder(nsGlobalWindow *aWindow);
|
||||
|
||||
nsGlobalWindow* GetInnerWindow() { return mInnerWindow; }
|
||||
|
||||
|
@ -2264,10 +2264,9 @@ protected:
|
|||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(WindowStateHolder, WINDOWSTATEHOLDER_IID)
|
||||
|
||||
WindowStateHolder::WindowStateHolder(nsIScriptContext* aContext,
|
||||
nsGlobalWindow* aWindow)
|
||||
WindowStateHolder::WindowStateHolder(nsGlobalWindow* aWindow)
|
||||
: mInnerWindow(aWindow),
|
||||
mInnerWindowReflector(aContext->GetNativeContext(), aWindow->GetWrapper())
|
||||
mInnerWindowReflector(nsContentUtils::RootingCx(), aWindow->GetWrapper())
|
||||
{
|
||||
NS_PRECONDITION(aWindow, "null window");
|
||||
NS_PRECONDITION(aWindow->IsInnerWindow(), "Saving an outer window");
|
||||
|
@ -12949,7 +12948,7 @@ nsGlobalWindow::SaveWindowState()
|
|||
// to the page.
|
||||
inner->Freeze();
|
||||
|
||||
nsCOMPtr<nsISupports> state = new WindowStateHolder(mContext, inner);
|
||||
nsCOMPtr<nsISupports> state = new WindowStateHolder(inner);
|
||||
|
||||
#ifdef DEBUG_PAGE_CACHE
|
||||
printf("saving window state, state = %p\n", (void*)state);
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
class nsIScriptGlobalObject;
|
||||
|
||||
#define NS_ISCRIPTCONTEXT_IID \
|
||||
{ 0x901f0d5e, 0x217a, 0x45fa, \
|
||||
{ 0x9a, 0xca, 0x45, 0x0f, 0xe7, 0x2f, 0x10, 0x9a } }
|
||||
{ 0x54cbe9cf, 0x7282, 0x421a, \
|
||||
{ 0x91, 0x6f, 0xd0, 0x70, 0x73, 0xde, 0xb8, 0xc0 } }
|
||||
|
||||
class nsIOffThreadScriptReceiver;
|
||||
|
||||
|
@ -37,12 +37,6 @@ public:
|
|||
**/
|
||||
virtual nsIScriptGlobalObject *GetGlobalObject() = 0;
|
||||
|
||||
/**
|
||||
* Return the native script context
|
||||
*
|
||||
**/
|
||||
virtual JSContext* GetNativeContext() = 0;
|
||||
|
||||
/**
|
||||
* Initialize the context generally. Does not create a global object.
|
||||
**/
|
||||
|
|
|
@ -715,12 +715,6 @@ nsJSContext::GetGlobalObject()
|
|||
return mGlobalObjectRef;
|
||||
}
|
||||
|
||||
JSContext*
|
||||
nsJSContext::GetNativeContext()
|
||||
{
|
||||
return mContext;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsJSContext::InitContext()
|
||||
{
|
||||
|
|
|
@ -50,7 +50,6 @@ public:
|
|||
virtual nsIScriptGlobalObject *GetGlobalObject() override;
|
||||
inline nsIScriptGlobalObject *GetGlobalObjectRef() { return mGlobalObjectRef; }
|
||||
|
||||
virtual JSContext* GetNativeContext() override;
|
||||
virtual nsresult InitContext() override;
|
||||
virtual bool IsContextInitialized() override;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче