# HG changeset patch # User Sebastien Jodogne # Date 1542303710 -3600 # Node ID d638d5721f1c54b96a5dc2e9dceb0b40c781c806 # Parent c23df8b3433b046ce5433765ab410db4cfe1c101 replace deprecated writeStringToMemory by stringToUTF8 diff -r c23df8b3433b -r d638d5721f1c Platforms/Wasm/WasmWebService.js --- 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);