Mercurial > hg > orthanc-stone
changeset 419:d638d5721f1c
replace deprecated writeStringToMemory by stringToUTF8
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 15 Nov 2018 18:41:50 +0100 |
parents | c23df8b3433b |
children | 8bf717c4e497 |
files | Platforms/Wasm/WasmWebService.js |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Platforms/Wasm/WasmWebService.js Thu Nov 15 18:32:48 2018 +0100 +++ b/Platforms/Wasm/WasmWebService.js Thu Nov 15 18:41:50 2018 +0100 @@ -19,7 +19,7 @@ if (xhr.status === 200) { var s = xhr.getAllResponseHeaders(); var headers = _malloc(s.length + 1); - writeStringToMemory(s, headers); + stringToUTF8(s, headers, s.length + 1); // TODO - Is "new Uint8Array()" necessary? This copies the // answer to the WebAssembly stack, hence necessitating @@ -54,7 +54,7 @@ if (xhr.status === 200) { var s = xhr.getAllResponseHeaders(); var headers = _malloc(s.length + 1); - writeStringToMemory(s, headers); + stringToUTF8(s, headers, s.length + 1); WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response), this.response.byteLength, headers, payload); @@ -86,7 +86,7 @@ if (xhr.status === 200) { var s = xhr.getAllResponseHeaders(); var headers = _malloc(s.length + 1); - writeStringToMemory(s, headers); + stringToUTF8(s, headers, s.length + 1); WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response), this.response.byteLength, headers, payload);