1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 23:12:28 +02:00
This commit is contained in:
gorhill 2014-09-14 17:14:58 -04:00
parent 44cb5faf50
commit fa88ba77fd
3 changed files with 3 additions and 5 deletions

View File

@ -615,9 +615,6 @@ var uBlockMessaging = (function(name){
(function() {
var messaging = uBlockMessaging;
var readyProps = {
'img': 'complete'
};
var srcProps = {
'embed': 'src',
'iframe': 'src',

View File

@ -40,6 +40,8 @@
// implementation of Math.random(), but as long as I have a good expectation
// of uniqueness, it's ok, we are not dealing with critical stuff here.
/* global chrome */
var messaging = (function(name){
var port = null;
var requestId = 1;

View File

@ -100,7 +100,6 @@ var announce = function(msg) {
defaultHandler(msg, null, nullFunc);
// Extension pages & content scripts handlers
var port;
for ( var portName in nameToPortMap ) {
if ( nameToPortMap.hasOwnProperty(portName) === false ) {
continue;
@ -202,7 +201,7 @@ var onDisconnect = function(port) {
listener(msg, port.sender, nullFunc);
// Cleanup port if no longer in use.
var port = nameToPortMap[port.name];
port = nameToPortMap[port.name];
if ( port ) {
delete nameToPortMap[port.name];
port.onMessage.removeListener(onMessage);