Bug 1124456 - Check channel's contentPolicyType to see if it is XMLHttpRequest. r=vporof

This commit is contained in:
Tom Tromey 2015-03-27 06:00:00 -04:00
parent 23161832a7
commit 9c805d4ded
2 changed files with 2 additions and 8 deletions

View File

@ -57,7 +57,6 @@ skip-if = e10s # Bug 1091596
[browser_net_cyrillic-02.js]
[browser_net_details-no-duplicated-content.js]
[browser_net_filter-01.js]
skip-if = e10s # Bug 1091603
[browser_net_filter-02.js]
[browser_net_filter-03.js]
[browser_net_filter-04.js]

View File

@ -753,13 +753,8 @@ NetworkMonitor.prototype = {
event.private = httpActivity.private;
// Determine if this is an XHR request.
try {
let callbacks = aChannel.notificationCallbacks;
let xhrRequest = callbacks ? callbacks.getInterface(Ci.nsIXMLHttpRequest) : null;
httpActivity.isXHR = event.isXHR = !!xhrRequest;
} catch (e) {
httpActivity.isXHR = event.isXHR = false;
}
httpActivity.isXHR = event.isXHR =
(aChannel.loadInfo.contentPolicyType === Ci.nsIContentPolicy.TYPE_XMLHTTPREQUEST);
// Determine the HTTP version.
aChannel.QueryInterface(Ci.nsIHttpChannelInternal);