From aab341dbd98a1cef603e57b3c12f8d82606bc8d1 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 13 Mar 2015 10:20:33 -0400 Subject: [PATCH] no need to test parentFrameId for `main_frame` requests --- src/js/traffic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index 379608950..7fbc606c8 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -54,7 +54,7 @@ var onBeforeRequest = function(details) { // https://github.com/gorhill/uBlock/issues/1001 // This must be executed regardless of whether the request is // behind-the-scene - if ( requestType === 'main_frame' && details.parentFrameId === -1 ) { + if ( requestType === 'main_frame' ) { pageStore = µb.bindTabToPageStats(tabId, requestURL, 'beforeRequest'); if ( pageStore !== null ) { pageStore.requestURL = requestURL; @@ -221,7 +221,7 @@ var onHeadersReceived = function(details) { var µb = µBlock; var pageStore = µb.pageStoreFromTabId(tabId); if ( !pageStore ) { - if ( details.type === 'main_frame' && details.parentFrameId === -1 ) { + if ( details.type === 'main_frame' ) { pageStore = µb.bindTabToPageStats(tabId, requestURL, 'beforeRequest'); } if ( !pageStore ) {