Bug 1423229 - [1.3] Enable nsIClassifiedChannel interface in onSecurityChange callbacks. r=mconley

This commit is contained in:
Eugen Sawin 2018-02-05 14:53:21 +01:00
parent d651932496
commit 829f2f0c99
2 changed files with 11 additions and 3 deletions

View File

@ -224,6 +224,11 @@ var WebProgressListener = {
json.state = aState;
json.status = SecurityUI.getSSLStatusAsString();
json.matchedList = null;
if (aRequest && aRequest instanceof Ci.nsIClassifiedChannel) {
json.matchedList = aRequest.matchedList;
}
this._send("Content:SecurityChange", json, objects);
},

View File

@ -12,19 +12,21 @@ const Cu = Components.utils;
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
function RemoteWebProgressRequest(spec, originalSpec, requestCPOW) {
function RemoteWebProgressRequest(spec, originalSpec, matchedList, requestCPOW) {
this.wrappedJSObject = this;
this._uri = Services.io.newURI(spec);
this._originalURI = Services.io.newURI(originalSpec);
this._requestCPOW = requestCPOW;
this._matchedList = matchedList;
}
RemoteWebProgressRequest.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel]),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIClassifiedChannel]),
get URI() { return this._uri.clone(); },
get originalURI() { return this._originalURI.clone(); }
get originalURI() { return this._originalURI.clone(); },
get matchedList() { return this._matchedList; }
};
function RemoteWebProgress(aManager, aIsTopLevel) {
@ -213,6 +215,7 @@ RemoteWebProgressManager.prototype = {
if (json.requestURI) {
request = new RemoteWebProgressRequest(json.requestURI,
json.originalRequestURI,
json.matchedList,
objects.request);
}