Remove the onMessage/onDisconnect listeners that the chrome.runtime.sendMessage
commitf56724985b90e168be0acb52312ad1366db63e4c
authorkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 20 Nov 2013 21:30:53 +0000 (20 21:30 +0000)
committerkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 20 Nov 2013 21:30:53 +0000 (20 21:30 +0000)
tree1fd67b2cde3ecb37d3f06f552a34601c42586353
parentcf0cee0ac5db0a045314bf1bdee0854feb0399fe
Remove the onMessage/onDisconnect listeners that the chrome.runtime.sendMessage
implementation adds to the Port it creates.

The underlying leak remains where any onMessage/onDisconnect listeners added to
a Port, but not removed, will be leaked when the Port goes out of scope; but at
least the most common case will be fixed.

BUG=320723
R=koz@chromium.org

Review URL: https://codereview.chromium.org/76423003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236301 0039d316-1c4b-4281-b951-d872f2087c98
chrome/renderer/extensions/safe_builtins.cc
chrome/renderer/resources/extensions/event.js
chrome/renderer/resources/extensions/messaging.js