Bug 771765 - Support template content process, part 4: Clone IPC protocol objects that will be up when the template process is ready. r=khuey, r=bent
This commit is contained in:
@@ -19,6 +19,7 @@ using namespace js;
|
||||
using namespace JS;
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::jsipc;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
JavaScriptParent::JavaScriptParent()
|
||||
: refcount_(1),
|
||||
@@ -683,3 +684,14 @@ JavaScriptParent::domInstanceOf(JSObject *obj, int prototypeID, int depth, bool
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user