code review for last commit

This commit is contained in:
gorhill 2015-04-07 21:58:19 -04:00
parent a2caf3c42d
commit 44bbf356f7
2 changed files with 6 additions and 8 deletions

View File

@ -693,12 +693,10 @@ PageStore.prototype.filterRequestNoCache = function(context) {
// https://github.com/chrisaljoudi/uBlock/pull/1209
// Not ideal, but until something better is figured, this solves the issue.
// This works so long as there is no `rootURL` property added to the page
// store. Long term, I have some ideas I would like to test to take care
// of those cases for which a page store may not have been definitely
// bound to a tab.
if ( typeof context.rootURL === 'string' ) {
if ( µb.getNetFilteringSwitch(context.rootURL) === false ) {
// Long term, I have some ideas I would like to test to take care of those
// cases for which a page store may not have been definitely bound to a tab.
if ( context.overrideStore ) {
if ( µb.getNetFilteringSwitch(context.requestURL) === false ) {
return '';
}
} else if ( this.getNetFilteringSwitch() === false ) {

View File

@ -384,9 +384,9 @@ var onHeadersReceived = function(details) {
if ( details.parentFrameId === -1 ) {
var contextDomain = µb.URI.domainFromHostname(requestHostname);
// https://github.com/chrisaljoudi/uBlock/pull/1209
// Adding `rootURL` solves the issue.
// Using `overrideStore` solves the issue.
context = {
rootURL: requestURL,
overrideStore: true,
rootHostname: requestHostname,
rootDomain: contextDomain,
pageHostname: requestHostname,