mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1176214 - Part 13: Changes to ipc. r=mrbkap
--HG-- extra : rebase_source : 1ee26bdb0e97b0a494bcc0c534f322d53be85b4e
This commit is contained in:
parent
49063542c0
commit
41a444a198
@ -206,9 +206,18 @@ RilConsumer::Send(JSContext* aCx, const CallArgs& aArgs)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
AutoCheckCannotGC nogc;
|
||||
size_t size = JS_GetTypedArrayByteLength(obj);
|
||||
void* data = JS_GetArrayBufferViewData(obj, nogc);
|
||||
bool isShared;
|
||||
void* data;
|
||||
{
|
||||
AutoCheckCannotGC nogc;
|
||||
data = JS_GetArrayBufferViewData(obj, &isShared, nogc);
|
||||
}
|
||||
if (isShared) {
|
||||
JS_ReportError(
|
||||
aCx, "Incorrect argument. Shared memory not supported");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
raw = new UnixSocketRawData(data, size);
|
||||
} else {
|
||||
JS_ReportError(
|
||||
@ -241,8 +250,10 @@ RilConsumer::Receive(JSContext* aCx,
|
||||
}
|
||||
{
|
||||
AutoCheckCannotGC nogc;
|
||||
memcpy(JS_GetArrayBufferViewData(array, nogc),
|
||||
bool isShared;
|
||||
memcpy(JS_GetArrayBufferViewData(array, &isShared, nogc),
|
||||
aBuffer->GetData(), aBuffer->GetSize());
|
||||
MOZ_ASSERT(!isShared); // Array was constructed above.
|
||||
}
|
||||
|
||||
AutoValueArray<2> args(aCx);
|
||||
|
Loading…
Reference in New Issue
Block a user