mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 978892 - [e10s] Avoid racing when creating PJavaScript object (r=mrbkap)
This commit is contained in:
parent
cfdece92b0
commit
a57b24343c
@ -751,6 +751,8 @@ static void FirstIdle(void)
|
||||
mozilla::jsipc::PJavaScriptChild *
|
||||
ContentChild::AllocPJavaScriptChild()
|
||||
{
|
||||
MOZ_ASSERT(!ManagedPJavaScriptChild().Length());
|
||||
|
||||
nsCOMPtr<nsIJSRuntimeService> svc = do_GetService("@mozilla.org/js/xpc/RuntimeService;1");
|
||||
NS_ENSURE_TRUE(svc, nullptr);
|
||||
|
||||
|
@ -1357,8 +1357,7 @@ ContentParent::GetCPOWManager()
|
||||
if (ManagedPJavaScriptParent().Length()) {
|
||||
return static_cast<JavaScriptParent*>(ManagedPJavaScriptParent()[0]);
|
||||
}
|
||||
JavaScriptParent* actor = static_cast<JavaScriptParent*>(SendPJavaScriptConstructor());
|
||||
return actor;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
TestShellParent*
|
||||
@ -2233,6 +2232,7 @@ ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline)
|
||||
mozilla::jsipc::PJavaScriptParent *
|
||||
ContentParent::AllocPJavaScriptParent()
|
||||
{
|
||||
MOZ_ASSERT(!ManagedPJavaScriptParent().Length());
|
||||
mozilla::jsipc::JavaScriptParent *parent = new mozilla::jsipc::JavaScriptParent();
|
||||
if (!parent->init()) {
|
||||
delete parent;
|
||||
|
@ -317,8 +317,6 @@ both:
|
||||
|
||||
async PBlob(BlobConstructorParams params);
|
||||
|
||||
async PJavaScript();
|
||||
|
||||
PFileDescriptorSet(FileDescriptor fd);
|
||||
|
||||
child:
|
||||
@ -425,6 +423,8 @@ parent:
|
||||
sync GetXPCOMProcessAttributes()
|
||||
returns (bool isOffline);
|
||||
|
||||
async PJavaScript();
|
||||
|
||||
PDeviceStorageRequest(DeviceStorageParams params);
|
||||
|
||||
PFileSystemRequest(FileSystemParams params);
|
||||
|
Loading…
Reference in New Issue
Block a user