зеркало из https://github.com/mozilla/gecko-dev.git
Bug 52116 javascript strict warning/error doesn't always contain Source File filename
handle onfoo inline event listeners r=bz sr=bz
This commit is contained in:
Родитель
9035b8ea4a
Коммит
fd9b3c984a
|
@ -1129,16 +1129,22 @@ nsEventListenerManager::AddScriptEventListener(nsISupports *aObject,
|
||||||
context = global->GetContext();
|
context = global->GetContext();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
doc = do_QueryInterface(aObject);
|
nsCOMPtr<nsIDOMWindow> win(do_QueryInterface(aObject));
|
||||||
|
|
||||||
nsCOMPtr<nsIScriptGlobalObject> global;
|
nsCOMPtr<nsIScriptGlobalObject> global;
|
||||||
|
if (win) {
|
||||||
if (doc) {
|
nsCOMPtr<nsIDOMDocument> domdoc;
|
||||||
global = doc->GetScriptGlobalObject();
|
win->GetDocument(getter_AddRefs(domdoc));
|
||||||
|
doc = do_QueryInterface(domdoc);
|
||||||
|
global = do_QueryInterface(win);
|
||||||
} else {
|
} else {
|
||||||
global = do_QueryInterface(aObject);
|
doc = do_QueryInterface(aObject);
|
||||||
}
|
|
||||||
|
|
||||||
|
if (doc) {
|
||||||
|
global = doc->GetScriptGlobalObject();
|
||||||
|
} else {
|
||||||
|
global = do_QueryInterface(aObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (global) {
|
if (global) {
|
||||||
context = global->GetContext();
|
context = global->GetContext();
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче