File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 105105
106106 var ChildPolicies = {
107107 addTabInfoCookie ( request , info ) {
108+ let { tabId, frameId} = request ;
108109 let h = {
109110 name : "Set-Cookie" ,
110- value : `${ marker } =${ JSON . stringify ( info ) } `
111+ value : `${ marker } _ ${ tabId } _ ${ frameId } =${ JSON . stringify ( info ) } `
111112 } ;
112113 let { responseHeaders} = request ;
113114 if ( responseHeaders . some ( ( { value, name} ) => h . value === value && h . name === name ) ) {
Original file line number Diff line number Diff line change 5252 // (before any content can access it)
5353
5454 if ( this . config . MARKER = MARKER ) {
55- let cookieRx = new RegExp ( `(?:^|;\\s*)${ MARKER } =([^;]*)` ) ;
55+ let cookieRx = new RegExp ( `(?:^|;\\s*)( ${ MARKER } (?:_\\d+){2}) =([^;]*)` ) ;
5656 let match = document . cookie . match ( cookieRx ) ;
5757 if ( match ) {
58+ let [ cookie , cookieName , cookieValue ] = match ;
5859 // delete cookie NOW
59- document . cookie = `${ MARKER } =;expires=${ new Date ( Date . now ( ) - 31536000000 ) . toGMTString ( ) } ` ;
60+ document . cookie = `${ cookieName } =;expires=${ new Date ( Date . now ( ) - 31536000000 ) . toGMTString ( ) } ` ;
6061 try {
61- this . config . tabInfo = JSON . parse ( decodeURIComponent ( match [ 1 ] ) ) ;
62+ this . config . tabInfo = JSON . parse ( decodeURIComponent ( cookieValue ) ) ;
6263 } catch ( e ) {
6364 error ( e ) ;
6465 }
You can’t perform that action at this time.
0 commit comments