diff options
author | Raymond Hill <rhill@raymondhill.net> | 2014-11-28 16:13:56 -0200 |
---|---|---|
committer | Raymond Hill <rhill@raymondhill.net> | 2014-11-28 16:13:56 -0200 |
commit | 151c26da5ca176a35b1e1e9a72c0ca53a96c2379 (patch) | |
tree | 653e117f3890682012b21815c3150d8a66505af9 | |
parent | c6227289a627d48b9c88ff95b4dd2a51836e3c7c (diff) | |
download | uBlock-151c26da5ca176a35b1e1e9a72c0ca53a96c2379.zip uBlock-151c26da5ca176a35b1e1e9a72c0ca53a96c2379.tar.gz uBlock-151c26da5ca176a35b1e1e9a72c0ca53a96c2379.tar.bz2 |
this fixes #380
-rw-r--r-- | platform/chromium/vapi-background.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index ce88e49..890af54 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -250,6 +250,10 @@ vAPI.messaging.onPortMessage = function(request, port) { var callback = vAPI.messaging.NOOPFUNC; if ( request.requestId !== undefined ) { callback = function(response) { + // https://github.com/gorhill/uBlock/issues/383 + if ( port.disconnected === true ) { + return; + } port.postMessage({ requestId: request.requestId, portName: request.portName, @@ -288,6 +292,8 @@ vAPI.messaging.onPortDisconnect = function(port) { port.onDisconnect.removeListener(vAPI.messaging.onPortDisconnect); port.onMessage.removeListener(vAPI.messaging.onPortMessage); delete vAPI.messaging.ports[port.name]; + // https://github.com/gorhill/uBlock/issues/383 + port.disconnected = true; }; /******************************************************************************/ |