fix(bindings/crypto-js): Let's not deal with Console.group.

Events and spans from `tracing` can happen asynchronously, and could
mess the `Console.group` structure.
This commit is contained in:
Ivan Enderlin
2022-07-14 09:04:44 +02:00
parent bb631f2f79
commit 283c5ff51e

View File

@@ -143,12 +143,6 @@ extern "C" {
#[wasm_bindgen(js_namespace = console, js_name = "log")]
fn log(message: String);
#[wasm_bindgen(js_namespace = console, js_name= "group")]
fn log_group_open(label: String);
#[wasm_bindgen(js_namespace = console, js_name= "groupEnd")]
fn log_group_close();
}
#[cfg(feature = "tracing")]
@@ -192,14 +186,6 @@ where
}
}
fn on_enter(&self, id: &Id, _: Context<'_, S>) {
log_group_open(format!("t{:x}", id.into_u64()));
}
fn on_exit(&self, _: &Id, _: Context<'_, S>) {
log_group_close();
}
fn on_event(&self, event: &Event<'_>, _: Context<'_, S>) {
let mut recorder = StringVisitor::new();
event.record(&mut recorder);