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}