| { | ||
| "git": { | ||
| "sha1": "fb403cfef5041fbe320eb8423003bda49ca33125" | ||
| "sha1": "753bb7ff4de2a00e30d2c6b56ee8e06a9e527f01" | ||
| }, | ||
| "path_in_vcs": "crates/js-sys" | ||
| } |
+9
-9
@@ -79,3 +79,3 @@ # This file is automatically @generated by Cargo. | ||
| name = "js-sys" | ||
| version = "0.3.94" | ||
| version = "0.3.95" | ||
| dependencies = [ | ||
@@ -153,5 +153,5 @@ "cfg-if", | ||
| name = "wasm-bindgen" | ||
| version = "0.2.117" | ||
| version = "0.2.118" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0" | ||
| checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" | ||
| dependencies = [ | ||
@@ -167,5 +167,5 @@ "cfg-if", | ||
| name = "wasm-bindgen-macro" | ||
| version = "0.2.117" | ||
| version = "0.2.118" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "7fbdf9a35adf44786aecd5ff89b4563a90325f9da0923236f6104e603c7e86be" | ||
| checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" | ||
| dependencies = [ | ||
@@ -178,5 +178,5 @@ "quote", | ||
| name = "wasm-bindgen-macro-support" | ||
| version = "0.2.117" | ||
| version = "0.2.118" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "dca9693ef2bab6d4e6707234500350d8dad079eb508dca05530c85dc3a529ff2" | ||
| checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" | ||
| dependencies = [ | ||
@@ -192,5 +192,5 @@ "bumpalo", | ||
| name = "wasm-bindgen-shared" | ||
| version = "0.2.117" | ||
| version = "0.2.118" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "39129a682a6d2d841b6c429d0c51e5cb0ed1a03829d8b3d1e69a011e62cb3d3b" | ||
| checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" | ||
| dependencies = [ | ||
@@ -197,0 +197,0 @@ "unicode-ident", |
+3
-3
@@ -14,5 +14,5 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| edition = "2021" | ||
| rust-version = "1.71" | ||
| rust-version = "1.77" | ||
| name = "js-sys" | ||
| version = "0.3.94" | ||
| version = "0.3.95" | ||
| authors = ["The wasm-bindgen Developers"] | ||
@@ -82,3 +82,3 @@ build = false | ||
| [dependencies.wasm-bindgen] | ||
| version = "=0.2.117" | ||
| version = "=0.2.118" | ||
| default-features = false | ||
@@ -85,0 +85,0 @@ |
@@ -26,4 +26,4 @@ use alloc::boxed::Box; | ||
| #[wasm_bindgen(js_namespace = console, js_name = createTask, catch)] | ||
| fn create_task(name: &str) -> Result<ConsoleTask, wasm_bindgen::JsValue>; | ||
| #[wasm_bindgen(thread_local_v2, js_namespace = console, js_name = createTask)] | ||
| static CREATE_TASK: Option<crate::Function<fn(crate::JsString) -> ConsoleTask>>; | ||
@@ -34,2 +34,12 @@ #[wasm_bindgen(method)] | ||
| #[cfg(debug_assertions)] | ||
| fn try_create_task(name: &str) -> Option<ConsoleTask> { | ||
| CREATE_TASK.with(|create_task| { | ||
| create_task.as_ref().and_then(|f| { | ||
| f.call(&wasm_bindgen::JsValue::UNDEFINED, (&name.into(),)) | ||
| .ok() | ||
| }) | ||
| }) | ||
| } | ||
| pub(crate) struct Task { | ||
@@ -55,3 +65,3 @@ // Console tracking for this task to avoid deeply nested stacks from individual `poll()` calls. | ||
| #[cfg(debug_assertions)] | ||
| console: create_task(core::any::type_name::<F>()).ok(), | ||
| console: try_create_task(core::any::type_name::<F>()), | ||
| inner: RefCell::new(None), | ||
@@ -58,0 +68,0 @@ is_queued: Cell::new(true), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display