Bug 1220936 - Flush console report to innerWindowID by using nsIDocument and nsILoadGroup. r=bkelly.

This commit is contained in:
Tom Tung
2017-02-06 09:19:34 +08:00
parent a0a0ee5d86
commit c08930401f
13 changed files with 207 additions and 138 deletions

View File

@@ -7572,7 +7572,13 @@ nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
nsCOMPtr<nsIConsoleReportCollector> reporter = do_QueryInterface(aChannel);
if (reporter) {
reporter->FlushConsoleReports(GetDocument());
nsCOMPtr<nsILoadGroup> loadGroup;
aChannel->GetLoadGroup(getter_AddRefs(loadGroup));
if (loadGroup) {
reporter->FlushConsoleReports(loadGroup);
} else {
reporter->FlushConsoleReports(GetDocument());
}
}
nsCOMPtr<nsIURI> url;