зеркало из https://github.com/mozilla/gecko-dev.git
Bug 935692: Don't try to fire error events on non-DOM globals. r=bent
This commit is contained in:
Родитель
28a5b72edd
Коммит
c097e70a19
|
@ -1211,8 +1211,7 @@ public:
|
||||||
bool preventDefaultCalled;
|
bool preventDefaultCalled;
|
||||||
nsIScriptGlobalObject* sgo;
|
nsIScriptGlobalObject* sgo;
|
||||||
|
|
||||||
if (aWorkerPrivate ||
|
if (aWorkerPrivate) {
|
||||||
!(sgo = nsJSUtils::GetStaticScriptGlobal(target))) {
|
|
||||||
WorkerGlobalScope* globalTarget = aWorkerPrivate->GlobalScope();
|
WorkerGlobalScope* globalTarget = aWorkerPrivate->GlobalScope();
|
||||||
MOZ_ASSERT(target == globalTarget->GetWrapperPreserveColor());
|
MOZ_ASSERT(target == globalTarget->GetWrapperPreserveColor());
|
||||||
|
|
||||||
|
@ -1233,7 +1232,7 @@ public:
|
||||||
|
|
||||||
preventDefaultCalled = status == nsEventStatus_eConsumeNoDefault;
|
preventDefaultCalled = status == nsEventStatus_eConsumeNoDefault;
|
||||||
}
|
}
|
||||||
else {
|
else if ((sgo = nsJSUtils::GetStaticScriptGlobal(target))) {
|
||||||
// Icky, we have to fire an InternalScriptErrorEvent...
|
// Icky, we have to fire an InternalScriptErrorEvent...
|
||||||
InternalScriptErrorEvent event(true, NS_LOAD_ERROR);
|
InternalScriptErrorEvent event(true, NS_LOAD_ERROR);
|
||||||
event.lineNr = aLineNumber;
|
event.lineNr = aLineNumber;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче