diff options
author | gorhill <rhill@raymondhill.net> | 2015-07-06 09:07:51 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-07-06 09:07:51 -0400 |
commit | a27b46b817018347c07d0603e27acdca8e42555a (patch) | |
tree | 14dd401c4e0b42f6a6c0226fe58cfc1f8a3cd8a8 /platform | |
parent | c11421d5748b5fe2ca681890cfd897f2a238945b (diff) | |
download | uBlock-a27b46b817018347c07d0603e27acdca8e42555a.zip uBlock-a27b46b817018347c07d0603e27acdca8e42555a.tar.gz uBlock-a27b46b817018347c07d0603e27acdca8e42555a.tar.bz2 |
this fixes stalling dom inspector
Diffstat (limited to 'platform')
-rw-r--r-- | platform/chromium/vapi-background.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 8609a90..9f0b03d 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -585,7 +585,7 @@ vAPI.messaging.onPortMessage = (function() { }; var toAux = function(details, portFrom) { - var portTo; + var port, portTo; var chromiumTabId = toChromiumTabId(details.toTabId); // TODO: This could be an issue with a lot of tabs: easy to address @@ -594,8 +594,11 @@ vAPI.messaging.onPortMessage = (function() { if ( messaging.ports.hasOwnProperty(portName) === false ) { continue; } - if ( messaging.ports[portName].sender.tab.id === chromiumTabId ) { - portTo = messaging.ports[portName]; + // When sending to an auxiliary process, the target is always the + // port associated with the root frame. + port = messaging.ports[portName]; + if ( port.sender.frameId === 0 && port.sender.tab.id === chromiumTabId ) { + portTo = port; break; } } |