Skip to content

Commit 61cf89f

Browse files
committed
fix raw alloc API
1 parent 3cfff2c commit 61cf89f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/Jsrt/Core/JsrtCore.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,10 +1373,9 @@ CHAKRA_API JsAllocRawData(_In_ JsRuntimeHandle runtimeHandle, _In_ size_t sizeIn
13731373
}
13741374

13751375
Recycler * recycler = threadContext->GetRecycler();
1376-
if (zeroed)
1377-
{
1378-
*buffer = RecyclerNewArray(recycler, char, sizeInBytes);
1379-
}
1376+
*buffer = zeroed
1377+
? RecyclerNewArrayZ(recycler, char, sizeInBytes)
1378+
: RecyclerNewArray(recycler, char, sizeInBytes);
13801379
return JsNoError;
13811380
});
13821381
}

0 commit comments

Comments
 (0)