diff options
Diffstat (limited to 'chrome/renderer/resources/renderer_extension_bindings.js')
-rw-r--r-- | chrome/renderer/resources/renderer_extension_bindings.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/renderer/resources/renderer_extension_bindings.js b/chrome/renderer/resources/renderer_extension_bindings.js index d8b5a4b..cf53de9 100644 --- a/chrome/renderer/resources/renderer_extension_bindings.js +++ b/chrome/renderer/resources/renderer_extension_bindings.js @@ -18,6 +18,8 @@ var chrome = chrome || {}; (function () { native function OpenChannelToExtension(id); native function CloseChannel(portId); + native function PortAddRef(portId); + native function PortRelease(portId); native function PostMessage(portId, msg); native function GetChromeHidden(); @@ -46,8 +48,9 @@ var chrome = chrome || {}; var port = new chrome.Port(portId, opt_name); ports[portId] = port; chromeHidden.onUnload.addListener(function() { - port.disconnect(); + PortRelease(portId); }); + PortAddRef(portId); return port; } |