Bug 1215140 P3 Flush pending console reports on http channels. r=bz

This commit is contained in:
Ben Kelly
2015-10-29 19:53:25 -07:00
parent 79f69231f6
commit f68d2366c4
2 changed files with 19 additions and 0 deletions

View File

@@ -82,6 +82,7 @@
#include "nsViewSourceHandler.h"
#include "nsWhitespaceTokenizer.h"
#include "nsICookieService.h"
#include "nsIConsoleReportCollector.h"
// we want to explore making the document own the load group
// so we can associate the document URI with the load group.
@@ -7357,6 +7358,11 @@ nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
return NS_ERROR_NULL_POINTER;
}
nsCOMPtr<nsIConsoleReportCollector> reporter = do_QueryInterface(aChannel);
if (reporter) {
reporter->FlushConsoleReports(GetDocument());
}
nsCOMPtr<nsIURI> url;
nsresult rv = aChannel->GetURI(getter_AddRefs(url));
if (NS_FAILED(rv)) {