Bug 776497 - Check for null currentInner when deciding to reuse inner windows. r=smaug

This commit is contained in:
Bobby Holley 2012-11-20 16:32:06 -08:00
Родитель dbf2d412a0
Коммит df900033e1
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1772,7 +1772,10 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
nsContentUtils::AddScriptRunner(
NS_NewRunnableMethod(this, &nsGlobalWindow::ClearStatus));
bool reUseInnerWindow = aForceReuseInnerWindow || wouldReuseInnerWindow;
// Sometimes, WouldReuseInnerWindow() returns true even if there's no inner
// window (see bug 776497). Be safe.
bool reUseInnerWindow = (aForceReuseInnerWindow || wouldReuseInnerWindow) &&
GetCurrentInnerWindowInternal();
nsresult rv = NS_OK;