aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2015-03-15 14:23:34 -0400
committergorhill <rhill@raymondhill.net>2015-03-15 14:23:34 -0400
commit1641b5e01273ef71806bbf0f56132aff298b3063 (patch)
tree3c074cec936d45ba9ccaf7e121b0b45eb82e027c /src
parent38d308f1f036b6028adaa7f759481b73d4bdc5b2 (diff)
parenta3abf7aa2b1167968c98ca72fa73701f9df64101 (diff)
downloaduBlock-1641b5e01273ef71806bbf0f56132aff298b3063.zip
uBlock-1641b5e01273ef71806bbf0f56132aff298b3063.tar.gz
uBlock-1641b5e01273ef71806bbf0f56132aff298b3063.tar.bz2
Merge branch 'fix1025' of github.com:gorhill/uBlock
Diffstat (limited to 'src')
-rw-r--r--src/js/1p-filters.js1
-rw-r--r--src/js/traffic.js9
2 files changed, 9 insertions, 1 deletions
diff --git a/src/js/1p-filters.js b/src/js/1p-filters.js
index 26853c8..24709a0 100644
--- a/src/js/1p-filters.js
+++ b/src/js/1p-filters.js
@@ -171,4 +171,3 @@ uDom.onLoad(function() {
// https://www.youtube.com/watch?v=UNilsLf6eW4
})();
-
diff --git a/src/js/traffic.js b/src/js/traffic.js
index 7fbc606..06f5aae 100644
--- a/src/js/traffic.js
+++ b/src/js/traffic.js
@@ -35,6 +35,7 @@
// This is to be used as last-resort fallback in case a tab is found to not
// be bound while network requests are fired for the tab.
+var mostRecentRootDocURLTimestamp = 0;
var mostRecentRootDocURL = '';
/******************************************************************************/
@@ -63,6 +64,7 @@ var onBeforeRequest = function(details) {
pageStore.logRequest(pageStore, '');
}
mostRecentRootDocURL = requestURL;
+ mostRecentRootDocURLTimestamp = Date.now();
return;
}
@@ -76,6 +78,13 @@ var onBeforeRequest = function(details) {
// Lookup the page store associated with this tab id.
pageStore = µb.pageStoreFromTabId(tabId);
if ( !pageStore ) {
+ // https://github.com/gorhill/uBlock/issues/1025
+ // Google Hangout popup opens without a root frame. So for now we will
+ // just discard that best-guess root frame if it is too far in the
+ // future, at which point it ceases to be a "best guess".
+ if ( (Date.now() - mostRecentRootDocURLTimestamp) >= 500 ) {
+ mostRecentRootDocURL = '';
+ }
// https://github.com/gorhill/uBlock/issues/1001
// Not a behind-the-scene request, yet no page store found for the
// tab id: we will thus bind the last-seen root document to the