diff options
author | Raymond Hill <rhill@raymondhill.net> | 2014-11-18 11:29:55 -0200 |
---|---|---|
committer | Raymond Hill <rhill@raymondhill.net> | 2014-11-18 11:29:55 -0200 |
commit | f090144d09312e1545519ba74c3b4c0e0e9989c6 (patch) | |
tree | 486680578ffca07bd46d1f8aa67671262832447b /meta | |
parent | d4402dfe02052395afa3908fe3846eea67ff43d6 (diff) | |
download | uBlock-f090144d09312e1545519ba74c3b4c0e0e9989c6.zip uBlock-f090144d09312e1545519ba74c3b4c0e0e9989c6.tar.gz uBlock-f090144d09312e1545519ba74c3b4c0e0e9989c6.tar.bz2 |
requests must be deemed unhandled by default
Diffstat (limited to 'meta')
-rw-r--r-- | meta/crx/vapi-background.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/crx/vapi-background.js b/meta/crx/vapi-background.js index a173a40..a6cfe65 100644 --- a/meta/crx/vapi-background.js +++ b/meta/crx/vapi-background.js @@ -244,7 +244,7 @@ vAPI.messaging.onPortMessage = function(request, port) { } // Specific handler - var r; + var r = vAPI.messaging.UNHANDLED; var listener = vAPI.messaging.listeners[request.portName]; if ( typeof listener === 'function' ) { r = listener(request.msg, port.sender, callback); @@ -264,16 +264,16 @@ vAPI.messaging.onPortMessage = function(request, port) { /******************************************************************************/ -vAPI.messaging.onDisconnect = function(port) { - port.onDisconnect.removeListener(vAPI.messaging.onDisconnect); +vAPI.messaging.onPortDisconnect = function(port) { + port.onDisconnect.removeListener(vAPI.messaging.onPortDisconnect); port.onMessage.removeListener(vAPI.messaging.onPortMessage); delete vAPI.messaging.ports[port.name]; }; /******************************************************************************/ -vAPI.messaging.onConnect = function(port) { - port.onDisconnect.addListener(vAPI.messaging.onDisconnect); +vAPI.messaging.onPortConnect = function(port) { + port.onDisconnect.addListener(vAPI.messaging.onPortDisconnect); port.onMessage.addListener(vAPI.messaging.onPortMessage); vAPI.messaging.ports[port.name] = port; }; @@ -291,7 +291,7 @@ vAPI.messaging.setup = function(defaultHandler) { } this.defaultHandler = defaultHandler; - chrome.runtime.onConnect.addListener(this.onConnect); + chrome.runtime.onConnect.addListener(this.onPortConnect); }; /******************************************************************************/ |