зеркало из https://github.com/mozilla/pjs.git
Make this code deal with setTimeout from a component. bug 414743, r=jst/waldo sr=jst
This commit is contained in:
Родитель
00303c681b
Коммит
6f2d6882fa
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -435,6 +435,7 @@ protected:
|
|||
void ClearControllers();
|
||||
|
||||
void FreeInnerObjects(PRBool aClearScope);
|
||||
nsGlobalWindow *CallerInnerWindow();
|
||||
|
||||
nsresult SetNewDocument(nsIDocument *aDocument,
|
||||
nsISupports *aState,
|
||||
|
|
Загрузка…
Ссылка в новой задаче