From 1c661dc68dd5e09c59159c573a068cdc1112e4c0 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 11 Jul 2022 11:33:59 +0200 Subject: [PATCH] [wasm] fix Debug configuration compilation (#71929) Current emcc compiler has problems with unicode chars in JS comments. Update our sources as workaround, before we have better solution. --- src/mono/wasm/runtime/buffers.ts | 8 ++++---- src/mono/wasm/runtime/js-to-cs.ts | 4 ++-- src/mono/wasm/runtime/polyfills.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mono/wasm/runtime/buffers.ts b/src/mono/wasm/runtime/buffers.ts index 3a607275fa6..cf23c6baca9 100644 --- a/src/mono/wasm/runtime/buffers.ts +++ b/src/mono/wasm/runtime/buffers.ts @@ -61,8 +61,8 @@ function typedarray_copy_to(typed_array: TypedArray, pinned_array: MonoArray, be // split the implementation into buffers and views. A buffer (implemented by the ArrayBuffer object) // is an object representing a chunk of data; it has no format to speak of, and offers no // mechanism for accessing its contents. In order to access the memory contained in a buffer, - // you need to use a view. A view provides a context — that is, a data type, starting offset, - // and number of elements — that turns the data into an actual typed array. + // you need to use a view. A view provides a context - that is, a data type, starting offset, + // and number of elements - that turns the data into an actual typed array. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays if (has_backing_array_buffer(typed_array) && typed_array.BYTES_PER_ELEMENT) { // Some sanity checks of what is being asked of us @@ -104,8 +104,8 @@ function typedarray_copy_from(typed_array: TypedArray, pinned_array: MonoArray, // split the implementation into buffers and views. A buffer (implemented by the ArrayBuffer object) // is an object representing a chunk of data; it has no format to speak of, and offers no // mechanism for accessing its contents. In order to access the memory contained in a buffer, - // you need to use a view. A view provides a context — that is, a data type, starting offset, - // and number of elements — that turns the data into an actual typed array. + // you need to use a view. A view provides a context - that is, a data type, starting offset, + // and number of elements - that turns the data into an actual typed array. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays if (has_backing_array_buffer(typed_array) && typed_array.BYTES_PER_ELEMENT) { // Some sanity checks of what is being asked of us diff --git a/src/mono/wasm/runtime/js-to-cs.ts b/src/mono/wasm/runtime/js-to-cs.ts index 4c418363815..890febfd05c 100644 --- a/src/mono/wasm/runtime/js-to-cs.ts +++ b/src/mono/wasm/runtime/js-to-cs.ts @@ -168,8 +168,8 @@ export function js_typed_array_to_array_root(js_obj: any, result: WasmRoot { return globalThis.fetch(url, { credentials: "same-origin" }); } else if (typeof (read) === "function") { - // note that it can't open files with unicode names, like Straße.xml + // note that it can't open files with unicode names, like Strae.xml // https://bugs.chromium.org/p/v8/issues/detail?id=12541 const arrayBuffer = new Uint8Array(read(url, "binary")); return { -- GitLab