未验证 提交 c158591b 编写于 作者: M Marek Fišera 提交者: GitHub

[wasm] Migrate to ref/out param while reading data from typed array (#70823)

Use js_typed_array_to_array_root in mono_wasm_typed_array_to_array_ref
上级 8fb75deb
......@@ -278,7 +278,7 @@ export function _wrap_js_thenable_as_task_root(thenable: Promise<any>, resultRoo
}
export function mono_wasm_typed_array_to_array_ref(js_handle: JSHandle, is_exception: Int32Ptr, result_address: MonoObjectRef): void {
const resultRoot = mono_wasm_new_external_root<MonoObject>(result_address);
const resultRoot = mono_wasm_new_external_root<MonoArray>(result_address);
try {
const js_obj = mono_wasm_get_jsobj_from_js_handle(js_handle);
if (is_nullish(js_obj)) {
......@@ -287,8 +287,7 @@ export function mono_wasm_typed_array_to_array_ref(js_handle: JSHandle, is_excep
}
// returns pointer to C# array
// FIXME: ref
resultRoot.value = js_typed_array_to_array(js_obj);
js_typed_array_to_array_root(js_obj, resultRoot);
} catch (exc) {
wrap_error_root(is_exception, String(exc), resultRoot);
} finally {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册