function dispatchOnConnect(portId,
                             channelName,
                             sourceTab,
                             sourceFrameId,
                             guestProcessId,
                             guestRenderFrameRoutingId,
                             sourceExtensionId,
                             targetExtensionId,
                             sourceUrl,
                             tlsChannelId) {
    var wasPortUsed = dispatchOnConnectImpl(portId, channelName, sourceTab,
                                            sourceFrameId, guestProcessId,
                                            guestRenderFrameRoutingId,
                                            sourceExtensionId,
                                            targetExtensionId, sourceUrl,
                                            tlsChannelId);
    if (!wasPortUsed) {
      // Since the JS to dispatch the connect event can (in rare cases) be
      // executed asynchronously from when we check if there are associated
      // listeners in the native code, it's possible that the listeners have
      // since been removed. If that's the case (though unlikely), remove the
      // port.
      messagingNatives.CloseChannel(portId, false /* force_close */);
    }
  }
// Called by native code when a channel has been opened to this context.
Called by native code when a channel has been opened to this context.
Called by native code when a channel has been opened to this context .
function dispatchOnConnect(portId,
                             channelName,
                             sourceTab,
                             sourceFrameId,
                             guestProcessId,
                             guestRenderFrameRoutingId,
                             sourceExtensionId,
                             targetExtensionId,
                             sourceUrl,
                             tlsChannelId) {
    var wasPortUsed = dispatchOnConnectImpl(portId, channelName, sourceTab,
                                            sourceFrameId, guestProcessId,
                                            guestRenderFrameRoutingId,
                                            sourceExtensionId,
                                            targetExtensionId, sourceUrl,
                                            tlsChannelId);
    if (!wasPortUsed) {
      messagingNatives.CloseChannel(portId, false );
    }
  }
function dispatchOnConnect ( portId , channelName , sourceTab , sourceFrameId , guestProcessId , guestRenderFrameRoutingId , sourceExtensionId , targetExtensionId , sourceUrl , tlsChannelId ) { var wasPortUsed = dispatchOnConnectImpl ( portId , channelName , sourceTab , sourceFrameId , guestProcessId , guestRenderFrameRoutingId , sourceExtensionId , targetExtensionId , sourceUrl , tlsChannelId ) ; if ( ! wasPortUsed ) { messagingNatives . CloseChannel ( portId , false ) ; } }
Called by native code when a channel has been opened to this context.
Called by native code when a channel has been opened to this context .
// Since the JS to dispatch the connect event can (in rare cases) be // executed asynchronously from when we check if there are associated // listeners in the native code, it's possible that the listeners have // since been removed. If that's the case (though unlikely), remove the // port. /* force_close */