Lines Matching refs:portId
34 function getOppositePortId(portId) { return portId ^ 1; } argument
38 function PortImpl(portId, opt_name) { argument
39 this.portId_ = portId;
80 var portId = this.portId_;
87 messagingNatives.PortRelease(portId);
88 unloadEvent.removeListener(portReleasers[portId]);
90 delete ports[portId];
91 delete portReleasers[portId];
97 function hasPort(portId) { argument
98 return portId in ports;
103 function createPort(portId, opt_name) { argument
104 if (ports[portId])
105 throw new Error("Port '" + portId + "' already exists.");
106 var port = new Port(portId, opt_name);
107 ports[portId] = port;
108 portReleasers[portId] = $Function.bind(messagingNatives.PortRelease,
110 portId);
111 unloadEvent.addListener(portReleasers[portId]);
112 messagingNatives.PortAddRef(portId);
142 function dispatchOnRequest(portId, channelName, sender, argument
162 var port = createPort(portId, channelName);
216 function dispatchOnConnect(portId, argument
233 if (ports[getOppositePortId(portId)])
252 return dispatchOnRequest(portId, channelName, sender,
267 var port = createPort(portId, channelName);
282 function dispatchOnDisconnect(portId, errorMessage) { argument
283 var port = ports[portId];
286 messagingNatives.CloseChannel(portId, false);
299 function dispatchOnMessage(msg, portId) { argument
300 var port = ports[portId];