зеркало из https://github.com/mozilla/gecko-dev.git
Bug 927078 - Don't copy string data when sending messages using message manager, r=bsmedberg
This commit is contained in:
Родитель
677b8c872c
Коммит
51e4523cfd
|
@ -1743,11 +1743,11 @@ public:
|
|||
return false;
|
||||
}
|
||||
if (aIsSync) {
|
||||
return cc->SendSyncMessage(nsString(aMessage), data, cpows, aPrincipal,
|
||||
aJSONRetVal);
|
||||
return cc->SendSyncMessage(PromiseFlatString(aMessage), data, cpows,
|
||||
aPrincipal, aJSONRetVal);
|
||||
}
|
||||
return cc->CallRpcMessage(nsString(aMessage), data, cpows, aPrincipal,
|
||||
aJSONRetVal);
|
||||
return cc->CallRpcMessage(PromiseFlatString(aMessage), data, cpows,
|
||||
aPrincipal, aJSONRetVal);
|
||||
}
|
||||
|
||||
virtual bool DoSendAsyncMessage(JSContext* aCx,
|
||||
|
@ -1769,7 +1769,8 @@ public:
|
|||
if (!cc->GetCPOWManager()->Wrap(aCx, aCpows, &cpows)) {
|
||||
return false;
|
||||
}
|
||||
return cc->SendAsyncMessage(nsString(aMessage), data, cpows, aPrincipal);
|
||||
return cc->SendAsyncMessage(PromiseFlatString(aMessage), data, cpows,
|
||||
aPrincipal);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -2603,12 +2603,12 @@ TabChild::DoSendBlockingMessage(JSContext* aCx,
|
|||
}
|
||||
}
|
||||
if (aIsSync) {
|
||||
return SendSyncMessage(nsString(aMessage), data, cpows, aPrincipal,
|
||||
aJSONRetVal);
|
||||
return SendSyncMessage(PromiseFlatString(aMessage), data, cpows,
|
||||
aPrincipal, aJSONRetVal);
|
||||
}
|
||||
|
||||
return CallRpcMessage(nsString(aMessage), data, cpows, aPrincipal,
|
||||
aJSONRetVal);
|
||||
return CallRpcMessage(PromiseFlatString(aMessage), data, cpows,
|
||||
aPrincipal, aJSONRetVal);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -2629,7 +2629,7 @@ TabChild::DoSendAsyncMessage(JSContext* aCx,
|
|||
return false;
|
||||
}
|
||||
}
|
||||
return SendAsyncMessage(nsString(aMessage), data, cpows,
|
||||
return SendAsyncMessage(PromiseFlatString(aMessage), data, cpows,
|
||||
aPrincipal);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче