зеркало из https://github.com/mozilla/gecko-dev.git
eba0daa4d6
I think the intent of these calls is to not copy the information strings passed in, but to simply convert them to a friendlier nsString container for processing. In the TelephonyDialCallback case, we're copying the strings only to convert them to an array of JS::Value, which copies the data again. We might as well avoid one of the copies. In the TelephonyParent case, we're copying the strings only to send them over an IPC channel. Therefore, it's safe to not copy the strings initially, because the original strings will remain live long enough to send the IPC message. |
||
---|---|---|
.. | ||
PTelephony.ipdl | ||
PTelephonyRequest.ipdl | ||
TelephonyChild.cpp | ||
TelephonyChild.h | ||
TelephonyIPCSerializer.h | ||
TelephonyIPCService.cpp | ||
TelephonyIPCService.h | ||
TelephonyParent.cpp | ||
TelephonyParent.h | ||
TelephonyTypes.ipdlh |