mirror of https://github.com/gorhill/uBlock.git
try as much as possible to bind root doc to tab (#1001)
This commit is contained in:
parent
6dd4a244fc
commit
0f206fd602
|
@ -201,12 +201,19 @@ var onHeadersReceived = function(details) {
|
|||
return;
|
||||
}
|
||||
|
||||
var requestURL = details.url;
|
||||
|
||||
// Lookup the page store associated with this tab id.
|
||||
var µb = µBlock;
|
||||
var pageStore = µb.pageStoreFromTabId(tabId);
|
||||
if ( !pageStore ) {
|
||||
if ( details.type === 'main_frame' && details.parentFrameId === -1 ) {
|
||||
pageStore = µb.bindTabToPageStats(tabId, requestURL, 'beforeRequest');
|
||||
}
|
||||
if ( !pageStore ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/384
|
||||
// https://github.com/gorhill/uBlock/issues/540
|
||||
|
@ -215,7 +222,6 @@ var onHeadersReceived = function(details) {
|
|||
// pageStore.skipLocalMirroring = headerStartsWith(details.responseHeaders, 'content-security-policy') !== '';
|
||||
//}
|
||||
|
||||
var requestURL = details.url;
|
||||
var requestHostname = details.hostname;
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/525
|
||||
|
|
Loading…
Reference in New Issue