File tree Expand file tree Collapse file tree 3 files changed +10
-11
lines changed
Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 44
55serial_number = 0 ;
66
7- function ApplicableList ( logger , browser ) {
7+ function ApplicableList ( logger , uri ) {
88 this . log = logger ;
9- this . uri = browser . currentURI . clone ( ) ;
9+ this . uri = uri . clone ( ) ;
1010 if ( ! this . uri ) {
1111 this . log ( WARN , "NULL CLONING URI " + doc ) ;
12- if ( browser )
13- this . log ( WARN , "NULL CLONING URI " + browser . currentURI ) ;
14- if ( browser . currentURI )
15- this . log ( WARN , "NULL CLONING URI " + browser . currentURI . spec ) ;
12+ if ( uri ) {
13+ this . log ( WARN , "NULL CLONING URI " + uri . spec ) ;
14+ }
1615 }
17- this . home = browser . currentURI . spec ; // what doc we're housekeeping for
16+ this . home = uri . spec ; // what doc we're housekeeping for
1817 this . active = { } ;
1918 this . breaking = { } ; // rulesets with redirection loops
2019 this . inactive = { } ;
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ function show_applicable_list(menupopup) {
286286 // This case occurs for error pages and similar. We need a dummy alist
287287 // because populate_menu lives in there. Would be good to refactor this
288288 // away.
289- alist = new HTTPSEverywhere . ApplicableList ( HTTPSEverywhere . log , browser ) ;
289+ alist = new HTTPSEverywhere . ApplicableList ( HTTPSEverywhere . log , browser . currentURI ) ;
290290 weird = true ;
291291 }
292292 alist . populate_menu ( document , menupopup , weird ) ;
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ HTTPSEverywhere.prototype = {
341341 this . log ( WARN , "Get alist without browser" ) ;
342342 return null ;
343343 }
344- var alist = new ApplicableList ( this . log , browser ) ;
344+ var alist = new ApplicableList ( this . log , browser . currentURI ) ;
345345 this . setExpando ( browser , "applicable_rules" , alist ) ;
346346 return alist ;
347347 } ,
@@ -355,7 +355,7 @@ HTTPSEverywhere.prototype = {
355355 if ( alist ) {
356356 return alist ;
357357 } else {
358- alist = new ApplicableList ( this . log , browser ) ;
358+ alist = new ApplicableList ( this . log , browser . currentURI ) ;
359359 this . setExpando ( browser , "applicable_rules" , alist ) ;
360360 }
361361 return alist ;
@@ -608,7 +608,7 @@ HTTPSEverywhere.prototype = {
608608 new_alist = old_alist ;
609609 this . setExpando ( browser , "applicable_rules" , new_alist ) ;
610610 } else if ( ! new_alist ) {
611- new_alist = new ApplicableList ( this . log , browser ) ;
611+ new_alist = new ApplicableList ( this . log , browser . currentURI ) ;
612612 this . setExpando ( browser , "applicable_rules" , new_alist ) ;
613613 }
614614 return new_alist ;
You can’t perform that action at this time.
0 commit comments