Revert 2.5 CLs that relate to pulling Extension port management out of messaging.js.
commite9eaf5d68e674ff1ce760a6304266de3a0219787
authorkalman <kalman@chromium.org>
Wed, 13 May 2015 02:30:06 +0000 (12 19:30 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 13 May 2015 02:30:19 +0000 (13 02:30 +0000)
tree34b7090589e058ee0e9a1b3cefb84c56566d96dd
parent80bfc770417ee39973bd1dd3af63e0f3c0bbd616
Revert 2.5 CLs that relate to pulling Extension port management out of messaging.js.

The first is 1be1629824f63c62466b44fc90d40101fa9d495a:
"Clear the onMessage and onDisconnect listeners when their Extension Port is destroyed."
which was a fix to the original patch.

The second, original patch is 32b3a84be9aa4f70e83bd47c2a5cb32f05ad7f7e:
"Move the Extension Port implementation out of messaging.js into its own file port.js."

This is the key patch, which has caused no end of trouble. The goal was noble:
to fix the myriad of bugs which messaging has due to being written in JS not
C++. It appears that the moral of the story is: this is impossible, and the
hole we've dug in over the last 5 years cannot be recovered from (without a
complete rewrite, I suppose).

The last .5 of a patch was one of the tests added in
b9dca05429b19ad398d1dbf7496b44a94ba0f306 which will no longer pass.

BUG=486715,477323,475536
R=rockot@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#329571}
chrome/test/data/extensions/api_test/messaging/connect/test.js
extensions/extensions.gypi
extensions/renderer/dispatcher.cc
extensions/renderer/resources/extensions_renderer_resources.grd
extensions/renderer/resources/messaging.js
extensions/renderer/resources/port.js [deleted file]