File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ var RequestGuard = (() => {
318318 }
319319 capabilities = perms . capabilities ;
320320 } else {
321- if ( ! isMainFrame && type === "sub_frame" ) {
321+ if ( isMainFrame || type === "sub_frame" ) {
322322 await Settings . enforceTabRestrictions ( tabId ) ;
323323 }
324324 }
Original file line number Diff line number Diff line change 5252 // mess with it, though, so we wrap it around auto-hiding accessors
5353
5454 if ( this . config . MARKER = MARKER ) {
55+ let splitter = `${ MARKER } ,` ;
56+ this . getWindowName = ( ) => window . name . split ( splitter ) . pop ( ) ;
5557
5658 let tabInfoRx = new RegExp ( `^${ MARKER } \\[([^]*?)\\]${ MARKER } ,` ) ;
57- let name = window . name ;
58- try {
59- name = top . name ;
60- } catch ( e ) {
61- // won't work cross-origin
62- }
63- let tabInfoMatch = name . match ( tabInfoRx ) ;
59+
60+ let tabInfoMatch = window . name . match ( tabInfoRx ) ;
6461 if ( tabInfoMatch ) {
6562 try {
6663 this . config . tabInfo = JSON . parse ( tabInfoMatch [ 1 ] ) ;
6764 } catch ( e ) {
6865 error ( e ) ;
6966 }
7067 }
71- let splitter = `${ MARKER } ,` ;
72- this . getWindowName = ( ) => window . name . split ( splitter ) . pop ( ) ;
68+
7369 Reflect . defineProperty ( window . wrappedJSObject , "name" , {
7470 get : exportFunction ( ( ) => this . getWindowName ( ) , window . wrappedJSObject ) ,
7571 set : exportFunction ( value => {
You can’t perform that action at this time.
0 commit comments