Bug 823962 - Make CSP reports part of the originating document's loadgroup. r=sstamm,sicking

This commit is contained in:
Josh Matthews 2012-12-27 13:33:57 -05:00
parent 2f408047ad
commit 742e5a2607

View File

@ -322,6 +322,9 @@ ContentSecurityPolicy.prototype = {
// we need to set an nsIChannelEventSink on the channel object // we need to set an nsIChannelEventSink on the channel object
// so we can tell it to not follow redirects when posting the reports // so we can tell it to not follow redirects when posting the reports
chan.notificationCallbacks = new CSPReportRedirectSink(this._policy); chan.notificationCallbacks = new CSPReportRedirectSink(this._policy);
if (this._docRequest) {
chan.loadGroup = this._docRequest.loadGroup;
}
chan.QueryInterface(Ci.nsIUploadChannel) chan.QueryInterface(Ci.nsIUploadChannel)
.setUploadStream(content, "application/json", content.available()); .setUploadStream(content, "application/json", content.available());