From 5d43ed231ed57ef123df4f166f6b0e2193d56fc3 Mon Sep 17 00:00:00 2001 From: "Iban Eguia (Razican)" Date: Fri, 27 Aug 2021 19:20:22 +0200 Subject: [PATCH] Added "js" feature for getrandom for WebAssembly builds --- Cargo.lock | 5 +++-- boa/Cargo.toml | 3 +++ boa/src/builtins/array/tests.rs | 2 +- yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 511a5b6b79f..b1ee1a86a13 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,6 +13,7 @@ dependencies = [ "fast-float", "float-cmp", "gc", + "getrandom", "indexmap", "jemallocator", "measureme", @@ -608,9 +609,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1fa8cddc8fbbee11227ef194b5317ed014b8acbf15139bd716a18ad3fe99ec5" +checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" [[package]] name = "libgit2-sys" diff --git a/boa/Cargo.toml b/boa/Cargo.toml index 38f8ff8c4ec..60f59d9a5b4 100644 --- a/boa/Cargo.toml +++ b/boa/Cargo.toml @@ -42,6 +42,9 @@ unicode-normalization = "0.1.19" measureme = { version = "9.1.2", optional = true } once_cell = { version = "1.8.0", optional = true } +[target.wasm32-unknown-unknown.dependencies] +getrandom = { version = "0.2.3", features = ["js"] } + [dev-dependencies] criterion = "0.3.5" float-cmp = "0.9.0" diff --git a/boa/src/builtins/array/tests.rs b/boa/src/builtins/array/tests.rs index 82c7bc92429..22856160271 100644 --- a/boa/src/builtins/array/tests.rs +++ b/boa/src/builtins/array/tests.rs @@ -1544,7 +1544,7 @@ fn get_relative_end() { fn array_length_is_not_enumerable() { let mut context = Context::new(); - let array = Array::new_array(&mut context); + let array = Array::new_array(&context); let desc = array.get_property("length").unwrap(); assert!(!desc.expect_enumerable()); } diff --git a/yarn.lock b/yarn.lock index f84c42a0bab..2ab323cf7b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -80,9 +80,9 @@ integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== "@types/node@*": - version "16.7.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.7.1.tgz#c6b9198178da504dfca1fd0be9b2e1002f1586f0" - integrity sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A== + version "16.7.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.7.3.tgz#8eef3b12df245e6275f083dba37730f29700a75a" + integrity sha512-S6gm2sm9xIRWTxD7Ttj8N1ZrYfqdqZEU38Nwnrhd6krk7zf8vdgMgzz8hpAX9CfmXaJfP+Vqy2EhJpVavNEocg== "@types/retry@^0.12.0": version "0.12.1" @@ -511,9 +511,9 @@ camel-case@^4.1.1: tslib "^2.0.3" caniuse-lite@^1.0.30001251: - version "1.0.30001251" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz#6853a606ec50893115db660f82c094d18f096d85" - integrity sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A== + version "1.0.30001252" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz#cb16e4e3dafe948fc4a9bb3307aea054b912019a" + integrity sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw== chalk@^2.4.1: version "2.4.2" @@ -896,9 +896,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.811: - version "1.3.814" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.814.tgz#418fad80c3276a46103ca72a21a8290620d83c4a" - integrity sha512-0mH03cyjh6OzMlmjauGg0TLd87ErIJqWiYxMcOLKf5w6p0YEOl7DJAj7BDlXEFmCguY5CQaKVOiMjAMODO2XDw== + version "1.3.820" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.820.tgz#3b2672b59ed17847ed19f1281547f37bbfda87bb" + integrity sha512-5cFwDmo2yzEA9hn55KZ9+cX/b6DSFvpKz8Hb2fiDmriXWB+DBoXKXmncQwNRFBBTlUdsvPHCoy594OoMLAO0Tg== emojis-list@^3.0.0: version "3.0.0" @@ -1591,9 +1591,9 @@ isobject@^3.0.1: integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= jest-worker@^27.0.2: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.6.tgz#a5fdb1e14ad34eb228cfe162d9f729cdbfa28aed" - integrity sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA== + version "27.1.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.1.0.tgz#65f4a88e37148ed984ba8ca8492d6b376938c0aa" + integrity sha512-mO4PHb2QWLn9yRXGp7rkvXLAYuxwhq1ZYUo0LoDhg8wqvv4QizP1ZWEJOeolgbEgAWZLIEU0wsku8J+lGWfBhg== dependencies: "@types/node" "*" merge-stream "^2.0.0" @@ -2593,9 +2593,9 @@ terser@^4.6.3: source-map-support "~0.5.12" terser@^5.7.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.1.tgz#2dc7a61009b66bb638305cb2a824763b116bf784" - integrity sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg== + version "5.7.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.2.tgz#d4d95ed4f8bf735cb933e802f2a1829abf545e3f" + integrity sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw== dependencies: commander "^2.20.0" source-map "~0.7.2"