mozilla::ipc::IProtocol* JavaScriptParent::CloneProtocol(Channel* aChannel, ProtocolCloneContext* aCtx) { ContentParent *contentParent = aCtx->GetContentParent(); nsAutoPtr<PJavaScriptParent> actor(contentParent->AllocPJavaScriptParent()); if (!actor || !contentParent->RecvPJavaScriptConstructor(actor)) { return nullptr; } return actor.forget(); }