Make this code deal with setTimeout from a component. bug 414743, r=jst/waldo sr=jst

git-svn-id: svn://10.0.0.236/trunk@244488 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com 2008-01-30 05:30:11 +00:00
parent cee72a1a37
commit 41964f8e39
2 changed files with 5 additions and 2 deletions

View File

@ -5010,8 +5010,8 @@ nsGlobalWindow::GetFrames(nsIDOMWindow** aFrames)
return NS_OK;
}
static nsGlobalWindow*
CallerInnerWindow()
nsGlobalWindow*
nsGlobalWindow::CallerInnerWindow()
{
nsAXPCNativeCallContext *ncc;
nsresult rv = nsContentUtils::XPConnect()->GetCurrentNativeCallContext(&ncc);
@ -5041,6 +5041,8 @@ CallerInnerWindow()
// raw pointer here and let the QI's addref be balanced by the nsCOMPtr
// destructor's release.
nsCOMPtr<nsPIDOMWindow> win = do_QueryWrappedNative(wrapper);
if (!win)
return GetCurrentInnerWindowInternal();
return static_cast<nsGlobalWindow*>(win.get());
}

View File

@ -435,6 +435,7 @@ protected:
void ClearControllers();
void FreeInnerObjects(PRBool aClearScope);
nsGlobalWindow *CallerInnerWindow();
nsresult SetNewDocument(nsIDocument *aDocument,
nsISupports *aState,