зеркало из 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();
|
||||
}
|
||||
} else {
|
||||
doc = do_QueryInterface(aObject);
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> win(do_QueryInterface(aObject));
|
||||
nsCOMPtr<nsIScriptGlobalObject> global;
|
||||
|
||||
if (doc) {
|
||||
global = doc->GetScriptGlobalObject();
|
||||
if (win) {
|
||||
nsCOMPtr<nsIDOMDocument> domdoc;
|
||||
win->GetDocument(getter_AddRefs(domdoc));
|
||||
doc = do_QueryInterface(domdoc);
|
||||
global = do_QueryInterface(win);
|
||||
} else {
|
||||
global = do_QueryInterface(aObject);
|
||||
}
|
||||
doc = do_QueryInterface(aObject);
|
||||
|
||||
if (doc) {
|
||||
global = doc->GetScriptGlobalObject();
|
||||
} else {
|
||||
global = do_QueryInterface(aObject);
|
||||
}
|
||||
}
|
||||
if (global) {
|
||||
context = global->GetContext();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче