one more step to insure tab context is properly set

This commit is contained in:
gorhill 2015-04-29 10:29:23 -04:00
parent 6bf3d977c1
commit 6c80790975
3 changed files with 7 additions and 1 deletions

View file

@ -1938,7 +1938,7 @@ vAPI.onLoadAllCompleted = function() {
var tabId = this.tabs.getTabId(tab); var tabId = this.tabs.getTabId(tab);
var browser = getBrowserForTab(tab); var browser = getBrowserForTab(tab);
µb.tabContextManager.commit(tabId, browser.currentURI.asciiSpec); µb.tabContextManager.commit(tabId, browser.currentURI.asciiSpec);
µb.bindTabToPageStats(tabId, browser.currentURI.asciiSpec); µb.bindTabToPageStats(tabId);
browser.messageManager.sendAsyncMessage( browser.messageManager.sendAsyncMessage(
location.host + '-load-completed' location.host + '-load-completed'
); );

View file

@ -209,6 +209,10 @@ housekeep itself.
if ( vAPI.isBehindTheSceneTabId(this.tabId) ) { if ( vAPI.isBehindTheSceneTabId(this.tabId) ) {
return; return;
} }
var count = this.stack.length;
if ( count !== 0 && this.stack[count - 1] === url ) {
return;
}
this.stack.push(url); this.stack.push(url);
this.update(); this.update();
}; };

View file

@ -359,6 +359,8 @@ var onRootFrameHeadersReceived = function(details) {
// https://github.com/chrisaljoudi/uBlock/issues/516 // https://github.com/chrisaljoudi/uBlock/issues/516
if ( headerValue(details.responseHeaders, 'content-type').lastIndexOf('application/x-', 0) === 0 ) { if ( headerValue(details.responseHeaders, 'content-type').lastIndexOf('application/x-', 0) === 0 ) {
µb.tabContextManager.unpush(tabId, details.url); µb.tabContextManager.unpush(tabId, details.url);
} else {
µb.tabContextManager.push(tabId, details.url);
} }
// Lookup the page store associated with this tab id. // Lookup the page store associated with this tab id.