| Index: extensions/renderer/resources/messaging.js
|
| diff --git a/extensions/renderer/resources/messaging.js b/extensions/renderer/resources/messaging.js
|
| index 38ad9447c302b23f607108ad3fa049d7e0236770..f4c97e9e9ef5b5941af8964fd950d0495c0d010f 100644
|
| --- a/extensions/renderer/resources/messaging.js
|
| +++ b/extensions/renderer/resources/messaging.js
|
| @@ -26,10 +26,6 @@
|
| // Map of port IDs to port object.
|
| var ports = {__proto__: null};
|
|
|
| - // Change even to odd and vice versa, to get the other side of a given
|
| - // channel.
|
| - function getOppositePortId(portId) { return portId ^ 1; }
|
| -
|
| // Port object. Represents a connection to another script context through
|
| // which messages can be passed.
|
| function PortImpl(portId, opt_name) {
|
| @@ -104,13 +100,6 @@
|
| delete ports[this.portId_];
|
| };
|
|
|
| - // Returns true if the specified port id is in this context. This is used by
|
| - // the C++ to avoid creating the javascript message for all the contexts that
|
| - // don't care about a particular message.
|
| - function hasPort(portId) {
|
| - return $Object.hasOwnProperty(ports, portId);
|
| - };
|
| -
|
| // Hidden port creation function. We don't want to expose an API that lets
|
| // people add arbitrary port IDs to the port list.
|
| function createPort(portId, opt_name) {
|
| @@ -249,9 +238,6 @@
|
| // the right extension.
|
| logging.CHECK(targetExtensionId == extensionId);
|
|
|
| - if (ports[getOppositePortId(portId)])
|
| - return false; // this channel was opened by us, so ignore it
|
| -
|
| // Determine whether this is coming from another extension, so we can use
|
| // the right event.
|
| var isExternal = sourceExtensionId != extensionId;
|
| @@ -434,7 +420,6 @@ exports.$set('sendMessageImpl', sendMessageImpl);
|
| exports.$set('sendMessageUpdateArguments', sendMessageUpdateArguments);
|
|
|
| // For C++ code to call.
|
| -exports.$set('hasPort', hasPort);
|
| exports.$set('dispatchOnConnect', dispatchOnConnect);
|
| exports.$set('dispatchOnDisconnect', dispatchOnDisconnect);
|
| exports.$set('dispatchOnMessage', dispatchOnMessage);
|
|
|