File tree Expand file tree Collapse file tree
Open diff view settings
Expand file tree Collapse file tree
Open diff view settings
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments