From: stephan Date: Thu, 9 May 2024 18:54:05 +0000 (+0000) Subject: Reformulate a for-in loop to a for loop in wasm.xWrap() to work around downstream... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62da4878607ce56b798cab5e0e73474dad8ffcb7;p=thirdparty%2Fsqlite.git Reformulate a for-in loop to a for loop in wasm.xWrap() to work around downstream frameworks modifying the JS Array prototype, as reported in [forum:b549992634b55104|forum post b549992634b55104]. FossilOrigin-Name: ce2eb6d89a75204ef3e1f74f763d297108525533bea404f7c0dbaffe834144f6 --- diff --git a/ext/wasm/common/whwasmutil.js b/ext/wasm/common/whwasmutil.js index 0437ef35d8..b0670fcd2f 100644 --- a/ext/wasm/common/whwasmutil.js +++ b/ext/wasm/common/whwasmutil.js @@ -2012,8 +2012,12 @@ globalThis.WhWasmUtilInstaller = function(target){ arguments may be passed in after that one, and what those arguments are, is _not_ part of the public interface and is _not_ stable. + + Maintenance reminder: the Ember framework modifies the core + Array type, breaking for-in loops. */ - for(const i in args) args[i] = cxw.convertArgNoCheck( + let i = 0; + for(; i < args.length; ++i) args[i] = cxw.convertArgNoCheck( argTypes[i], args[i], args, i ); return cxw.convertResultNoCheck(resultType, xf.apply(null,args)); diff --git a/manifest b/manifest index edbed27f8c..c7df4329c8 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sproblem\scausing\sthe\srecovery\sextension\sto\suse\sexcessive\smemory\sand\sCPU\stime\sin\ssome\scases. -D 2024-05-09T17:45:21.894 +C Reformulate\sa\sfor-in\sloop\sto\sa\sfor\sloop\sin\swasm.xWrap()\sto\swork\saround\sdownstream\sframeworks\smodifying\sthe\sJS\sArray\sprototype,\sas\sreported\sin\s[forum:b549992634b55104|forum\spost\sb549992634b55104]. +D 2024-05-09T18:54:05.532 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -615,7 +615,7 @@ F ext/wasm/c-pp.c 6d80d8569d85713effe8b0818a3cf51dc779e3f0bf8dc88771b8998552ee25 F ext/wasm/common/SqliteTestUtil.js 7adaeffef757d8708418dc9190f72df22367b531831775804b31598b44f6aa51 F ext/wasm/common/emscripten.css 11bd104b6c0d597c67d40cc8ecc0a60dae2b965151e3b6a37fa5708bac3acd15 F ext/wasm/common/testing.css e97549bab24126c24e0daabfe2de9bb478fb0a69fdb2ddd0a73a992c091aad6f -F ext/wasm/common/whwasmutil.js 4c64594eecc7af4ae64259e95a71ba2a7edf118881aaff0bba86d0c7164e78e4 +F ext/wasm/common/whwasmutil.js 9abb78dbd07fc7249234f6228d15b97979dfa65be26cbc8b5fcd94d0717f663b F ext/wasm/demo-123-worker.html a0b58d9caef098a626a1a1db567076fca4245e8d60ba94557ede8684350a81ed F ext/wasm/demo-123.html 8c70a412ce386bd3796534257935eb1e3ea5c581e5d5aea0490b8232e570a508 F ext/wasm/demo-123.js c7b3cca50c55841c381a9ca4f9396e5bbdc6114273d0b10a43e378e32e7be5bf @@ -2161,11 +2161,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 8653b758870e6ef0c98d46b3ace27849054af85da891eb121e9aaa537f1e8355 -Q +1c7e33a8aa0e6122b5ef606e4a7d95e8ecd9440216d4b099fe8f2a40653422be -Q +8519b4d0393ed17eed06bceffbc891fe8cae0bc1d466a79eba0602ef46b07c56 -Q +8de85170d53e1d2a2abe14508a222377b9493e25f3174b8f0f773427deb8df26 -R 430233d8579bd1ffde420695ab0fdf43 -U dan -Z abdfc367ed4e3013b0caa6a11fc70684 +P bc394acb6e6bcaccd17d8afe559d743799c0cb8d7aec709306181673a35dcb86 +Q +857f5d7fadce1cfe30b3468826f403f736cfecacb1eb6d3b858b01ea3cfd6ffc +Q +dc58ed654928574ef254af289bd21c654c587aac80aea36ab96772c35d4ca754 +R 3a7c1263734f65e3c8fd8f8afd4c271c +U stephan +Z 41872c5ab92e2de07cd7488f196ff91a # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 7a28659657..c34a429fad 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -bc394acb6e6bcaccd17d8afe559d743799c0cb8d7aec709306181673a35dcb86 \ No newline at end of file +ce2eb6d89a75204ef3e1f74f763d297108525533bea404f7c0dbaffe834144f6 \ No newline at end of file