Skip to content

Commit 50556c0

Browse files
committed
Handle OCSP queries and other windowless requests
1 parent 0ebce4a commit 50556c0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/components/https-everywhere.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ HTTPSEverywhere.prototype = {
270270
// need to be appended to with reference only to the channel
271271
getApplicableListForChannel: function(channel) {
272272
var domWin = this.getWindowForChannel(channel);
273+
if (!domWin) return null;
273274
var alist= this.getExpando(domWin.document,"applicable_rules",null);
274275
if (alist) {
275276
this.log(WARN,"get AL success");
@@ -361,8 +362,11 @@ HTTPSEverywhere.prototype = {
361362
// with the old one because that's probably a better representation of how
362363
// secure the load process was for this page
363364
var domWin = this.getWindowForChannel(oldChannel);
364-
var old_alist = this.getExpando(domWin,"applicable_rules", null);
365+
var old_alist = null;
366+
if (domWin)
367+
old_alist = this.getExpando(domWin,"applicable_rules", null);
365368
domWin = this.getWindowForChannel(newChannel);
369+
if (!domWin) return null;
366370
var new_alist = this.getExpando(domWin,"applicable_rules", null);
367371
if (old_alist && !new_alist) {
368372
new_alist = old_alist;

0 commit comments

Comments
 (0)