зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1063271 - Undo bug 796938 part 10. r=smaug
This commit is contained in:
Родитель
a299798558
Коммит
409b2e58bf
|
@ -18,6 +18,7 @@
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsISupportsPrimitives.h"
|
#include "nsISupportsPrimitives.h"
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
|
#include "nsDOMJSUtils.h"
|
||||||
#include "nsJSUtils.h"
|
#include "nsJSUtils.h"
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
#include "nsIDocShellTreeItem.h"
|
#include "nsIDocShellTreeItem.h"
|
||||||
|
@ -564,7 +565,13 @@ NS_ScriptErrorReporter(JSContext *cx,
|
||||||
::JS_ClearPendingException(cx);
|
::JS_ClearPendingException(cx);
|
||||||
|
|
||||||
MOZ_ASSERT(cx == nsContentUtils::GetCurrentJSContext());
|
MOZ_ASSERT(cx == nsContentUtils::GetCurrentJSContext());
|
||||||
nsCOMPtr<nsIGlobalObject> globalObject = GetEntryGlobal();
|
nsCOMPtr<nsIGlobalObject> globalObject;
|
||||||
|
if (nsIScriptContext* scx = GetScriptContextFromJSContext(cx)) {
|
||||||
|
nsCOMPtr<nsPIDOMWindow> outer = do_QueryInterface(scx->GetGlobalObject());
|
||||||
|
if (outer) {
|
||||||
|
globalObject = static_cast<nsGlobalWindow*>(outer->GetCurrentInnerWindow());
|
||||||
|
}
|
||||||
|
}
|
||||||
if (globalObject) {
|
if (globalObject) {
|
||||||
|
|
||||||
nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(globalObject);
|
nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(globalObject);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче