Fix bad access to hostname info from filtering context

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1398

Regression from:
- 6df32675b1
This commit is contained in:
Raymond Hill 2020-12-14 08:38:30 -05:00
parent 1ff8132216
commit d4425ad753
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -377,7 +377,7 @@ const onBeforeBehindTheSceneRequest = function(fctxt) {
}; };
onBeforeBehindTheSceneRequest.journalAddRequest = (fctxt, result) => { onBeforeBehindTheSceneRequest.journalAddRequest = (fctxt, result) => {
const { docHostname } = fctxt; const docHostname = fctxt.getDocHostname();
if ( if (
docHostname !== hostname || docHostname !== hostname ||
pageStoresToken !== µBlock.pageStoresToken pageStoresToken !== µBlock.pageStoresToken
@ -395,7 +395,7 @@ const onBeforeBehindTheSceneRequest = function(fctxt) {
gcTimer = vAPI.setTimeout(gc, 30011); gcTimer = vAPI.setTimeout(gc, 30011);
} }
for ( const pageStore of pageStores ) { for ( const pageStore of pageStores ) {
pageStore.journalAddRequest(fctxt.hostname, result); pageStore.journalAddRequest(fctxt.getHostname(), result);
} }
}; };
} }