зеркало из 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:
Родитель
6d867d31ea
Коммит
69b8b5436e
|
@ -1211,8 +1211,7 @@ public:
|
|||
bool preventDefaultCalled;
|
||||
nsIScriptGlobalObject* sgo;
|
||||
|
||||
if (aWorkerPrivate ||
|
||||
!(sgo = nsJSUtils::GetStaticScriptGlobal(target))) {
|
||||
if (aWorkerPrivate) {
|
||||
WorkerGlobalScope* globalTarget = aWorkerPrivate->GlobalScope();
|
||||
MOZ_ASSERT(target == globalTarget->GetWrapperPreserveColor());
|
||||
|
||||
|
@ -1233,7 +1232,7 @@ public:
|
|||
|
||||
preventDefaultCalled = status == nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
else {
|
||||
else if (sgo = nsJSUtils::GetStaticScriptGlobal(target)) {
|
||||
// Icky, we have to fire an InternalScriptErrorEvent...
|
||||
InternalScriptErrorEvent event(true, NS_LOAD_ERROR);
|
||||
event.lineNr = aLineNumber;
|
||||
|
|
Загрузка…
Ссылка в новой задаче