1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 08:37:11 +02:00

#10: manually imported fixes from e762a29d30

This commit is contained in:
gorhill 2015-04-09 21:50:23 -04:00
parent 3eef0df98a
commit 63d9143d6b
2 changed files with 18 additions and 1 deletions

View File

@ -60,6 +60,19 @@ function startup(data, reason) {
}
let hiddenDoc = appShell.hiddenDOMWindow.document;
// https://github.com/gorhill/uBlock/issues/10
// Fixed by github.com/AlexVallat:
// https://github.com/chrisaljoudi/uBlock/issues/1149
// https://github.com/AlexVallat/uBlock/commit/e762a29d308caa46578cdc34a9be92c4ad5ecdd0
if ( hiddenDoc.readyState === 'loading' ) {
hiddenDoc.addEventListener('DOMContentLoaded', onReady);
return;
}
// I believe this needs to be called in case it was added above.
hiddenDoc.removeEventListener('DOMContentLoaded', onReady);
bgProcess = hiddenDoc.documentElement.appendChild(
hiddenDoc.createElementNS('http://www.w3.org/1999/xhtml', 'iframe')
);

View File

@ -65,7 +65,11 @@ vAPI.app.restart = function() {
var cleanupTasks = [];
// This must be updated manually, every time a new task is added/removed
var expectedNumberOfCleanups = 7;
// Fixed by github.com/AlexVallat:
// https://github.com/AlexVallat/uBlock/commit/7b781248f00cbe3d61b1cc367c440db80fa06049
// 7 instances of cleanupTasks.push, but one is unique to fennec, and one to desktop.
var expectedNumberOfCleanups = 6;
window.addEventListener('unload', function() {
for ( var cleanup of cleanupTasks ) {