File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
https-everywhere-tests/test_profile_skeleton Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,9 @@ user_pref("general.warnOnAboutConfig", false);
1212// Minimize unnecesary requests.
1313user_pref ( "browser.safebrowsing.enabled" , false ) ;
1414user_pref ( "browser.safebrowsing.malware.enabled" , false ) ;
15+ // These two preferences allow debugging the extension
16+ // using Tools > Web Developer > Browser Toolbox
17+ // (Note: Since this is not an SDK extension, you can't use the Addon
18+ // Debugger, but the Browser Toolbox is just about as good).
19+ user_pref ( "devtools.chrome.enabled" , true ) ;
20+ user_pref ( "devtools.debugger.remote-enabled" , true ) ;
Original file line number Diff line number Diff line change @@ -502,10 +502,13 @@ SSLObservatory.prototype = {
502502 // active now
503503 return this . everSeenPrivateBrowsing ;
504504 }
505- var win = this . HTTPSEverywhere . getWindowForChannel ( channel ) ;
506- if ( ! win ) return this . everSeenPrivateBrowsing ; // windowless request
505+ var browser = this . HTTPSEverywhere . getBrowserForChannel ( channel ) ;
506+ // windowless request
507+ if ( ! browser || ! browser . contentWindow ) {
508+ return this . everSeenPrivateBrowsing ;
509+ }
507510
508- if ( PrivateBrowsingUtils . isWindowPrivate ( win ) ) {
511+ if ( PrivateBrowsingUtils . isWindowPrivate ( browser . contentWindow ) ) {
509512 this . everSeenPrivateBrowsing = true ;
510513 return true ;
511514 }
@@ -816,7 +819,11 @@ SSLObservatory.prototype = {
816819
817820 var that = this ; // We have neither SSLObservatory nor this in scope in the lambda
818821
819- var win = channel ? this . HTTPSEverywhere . getWindowForChannel ( channel ) : null ;
822+ var win = null
823+ if ( channel ) {
824+ var browser = this . HTTPSEverywhere . getBrowserForChannel ( channel ) ;
825+ var win = browser . contentWindow ;
826+ }
820827 var req = this . buildRequest ( params ) ;
821828 req . timeout = TIMEOUT ;
822829
You can’t perform that action at this time.
0 commit comments