avoid potential double execution of firstRetrieveHandler (because mutations observer)

This commit is contained in:
gorhill 2015-01-01 09:15:37 -05:00
parent aca35e4cbc
commit 8562f70144
1 changed files with 3 additions and 4 deletions

View File

@ -79,6 +79,9 @@ var messager = vAPI.messaging.channel('contentscript-end.js');
},
retrieveHandler
);
// https://github.com/gorhill/uBlock/issues/452
// There is only one first..
retrieveHandler = otherRetrieveHandler;
} else {
otherRetrieveHandler(null);
}
@ -111,10 +114,6 @@ var messager = vAPI.messaging.channel('contentscript-end.js');
}
}
}
// There is only one first..
retrieveHandler = otherRetrieveHandler;
// Flush dead code from memory (does this work?)
firstRetrieveHandler = null;