| { | ||
| "git": { | ||
| "sha1": "98364582a9c6d02964a127586318e5518b163901" | ||
| "sha1": "f2f701290ac7e9b7052175a47d0e83f2d10675c9" | ||
| }, | ||
| "path_in_vcs": "crates/js-sys" | ||
| } |
+47
-9
@@ -18,2 +18,8 @@ # This file is automatically @generated by Cargo. | ||
| [[package]] | ||
| name = "crunchy" | ||
| version = "0.2.4" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" | ||
| [[package]] | ||
| name = "futures-channel" | ||
@@ -62,4 +68,15 @@ version = "0.3.32" | ||
| [[package]] | ||
| name = "half" | ||
| version = "2.7.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" | ||
| dependencies = [ | ||
| "cfg-if", | ||
| "crunchy", | ||
| "zerocopy", | ||
| ] | ||
| [[package]] | ||
| name = "js-sys" | ||
| version = "0.3.92" | ||
| version = "0.3.93" | ||
| dependencies = [ | ||
@@ -71,2 +88,3 @@ "cfg-if", | ||
| "futures-util", | ||
| "half", | ||
| "once_cell", | ||
@@ -137,5 +155,5 @@ "wasm-bindgen", | ||
| name = "wasm-bindgen" | ||
| version = "0.2.115" | ||
| version = "0.2.116" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "6523d69017b7633e396a89c5efab138161ed5aafcbc8d3e5c5a42ae38f50495a" | ||
| checksum = "7dc0882f7b5bb01ae8c5215a1230832694481c1a4be062fd410e12ea3da5b631" | ||
| dependencies = [ | ||
@@ -151,5 +169,5 @@ "cfg-if", | ||
| name = "wasm-bindgen-macro" | ||
| version = "0.2.115" | ||
| version = "0.2.116" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "4e3a6c758eb2f701ed3d052ff5737f5bfe6614326ea7f3bbac7156192dc32e67" | ||
| checksum = "75973d3066e01d035dbedaad2864c398df42f8dd7b1ea057c35b8407c015b537" | ||
| dependencies = [ | ||
@@ -162,5 +180,5 @@ "quote", | ||
| name = "wasm-bindgen-macro-support" | ||
| version = "0.2.115" | ||
| version = "0.2.116" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "921de2737904886b52bcbb237301552d05969a6f9c40d261eb0533c8b055fedf" | ||
| checksum = "91af5e4be765819e0bcfee7322c14374dc821e35e72fa663a830bbc7dc199eac" | ||
| dependencies = [ | ||
@@ -176,7 +194,27 @@ "bumpalo", | ||
| name = "wasm-bindgen-shared" | ||
| version = "0.2.115" | ||
| version = "0.2.116" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "a93e946af942b58934c604527337bad9ae33ba1d5c6900bbb41c2c07c2364a93" | ||
| checksum = "c9bf0406a78f02f336bf1e451799cca198e8acde4ffa278f0fb20487b150a633" | ||
| dependencies = [ | ||
| "unicode-ident", | ||
| ] | ||
| [[package]] | ||
| name = "zerocopy" | ||
| version = "0.8.48" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" | ||
| dependencies = [ | ||
| "zerocopy-derive", | ||
| ] | ||
| [[package]] | ||
| name = "zerocopy-derive" | ||
| version = "0.8.48" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" | ||
| dependencies = [ | ||
| "proc-macro2", | ||
| "quote", | ||
| "syn", | ||
| ] |
+5
-2
@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "js-sys" | ||
| version = "0.3.92" | ||
| version = "0.3.93" | ||
| authors = ["The wasm-bindgen Developers"] | ||
@@ -82,3 +82,3 @@ build = false | ||
| [dependencies.wasm-bindgen] | ||
| version = "=0.2.115" | ||
| version = "=0.2.116" | ||
| default-features = false | ||
@@ -93,2 +93,5 @@ | ||
| [target.'cfg(target_arch = "wasm32")'.dev-dependencies.half] | ||
| version = "2" | ||
| [lints.clippy] | ||
@@ -95,0 +98,0 @@ large_enum_variant = "allow" |
@@ -287,4 +287,8 @@ //! Converting between JavaScript `Promise`s to Rust `Future`s. | ||
| { | ||
| let mut future = Some(future); | ||
| Promise::new(&mut |resolve, reject| { | ||
| // Wrap `future` in AssertUnwindSafe and move it into the closure so the closure | ||
| // satisfies MaybeUnwindSafe (required when panic=unwind). Using `move` avoids | ||
| // capturing a `&mut` reference, which is never UnwindSafe. The Promise executor | ||
| // is not called inside a panic-catching context, so this is always safe. | ||
| let mut future = core::panic::AssertUnwindSafe(Some(future)); | ||
| Promise::new(&mut move |resolve, reject| { | ||
| let future = future.take().unwrap_throw(); | ||
@@ -291,0 +295,0 @@ spawn_local(async move { |
@@ -149,3 +149,9 @@ use alloc::boxed::Box; | ||
| let is_ready = match self.console.as_ref() { | ||
| Some(console) => console.run(&mut move || inner.is_ready()), | ||
| // Wrap `inner` in AssertUnwindSafe before capturing it, so the closure | ||
| // satisfies MaybeUnwindSafe (required when panic=unwind). This is safe: | ||
| // console.run's poll callback is not invoked inside a panic-catching context. | ||
| Some(console) => { | ||
| let mut inner = core::panic::AssertUnwindSafe(inner); | ||
| console.run(&mut move || inner.is_ready()) | ||
| } | ||
| None => inner.is_ready(), | ||
@@ -152,0 +158,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display