@@ -82,20 +82,37 @@ const capture = {
82
82
async shouldStore ( info ) {
83
83
const tabId = info . id || info . tabId ;
84
84
let documentUrl , privateBrowsing ;
85
+ // Ignore container tabs as we need to store them correctly
86
+ // showing a simpler graph just for default means we won't confuse users
87
+ // into thinking isolation has broken
88
+ const defaultCookieStore = 'firefox-default' ;
89
+ if ( 'cookieStoreId' in info
90
+ && info . cookieStoreId !== defaultCookieStore ) {
91
+ return false ;
92
+ }
85
93
if ( this . isVisibleTab ( tabId ) ) {
86
94
const tab = await this . getTab ( tabId ) ;
87
95
if ( ! tab ) {
88
96
return ;
89
97
}
98
+ if ( tab . cookieStoreId !== defaultCookieStore ) {
99
+ return false ;
100
+ }
90
101
documentUrl = new URL ( tab . url ) ;
91
102
privateBrowsing = tab . incognito ;
92
103
} else {
104
+ // if we were not able to check the cookie store
105
+ // lets drop this for paranoia sake.
106
+ if ( ! ( 'cookieStoreId' in info ) ) {
107
+ return false ;
108
+ }
93
109
// browser.tabs.get throws an error for nonvisible tabs (tabId = -1)
94
110
// but some non-visible tabs can make third party requests,
95
111
// ex: Service Workers
96
112
documentUrl = new URL ( info . originUrl ) ;
97
113
privateBrowsing = false ;
98
114
}
115
+
99
116
// ignore about:*, moz-extension:*
100
117
// also ignore private browsing tabs
101
118
if ( documentUrl . protocol !== 'about:'
0 commit comments