File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -457,11 +457,12 @@ fn rust_panic_with_hook(payload: &mut dyn BoxMeUp,
457
457
let mut info = PanicInfo :: internal_constructor ( message, & location) ;
458
458
HOOK_LOCK . read ( ) ;
459
459
match HOOK {
460
- // Some platforms know that printing to stderr won't ever actually
460
+ // Some platforms (like wasm) know that printing to stderr won't ever actually
461
461
// print anything, and if that's the case we can skip the default
462
462
// hook. Since string formatting happens lazily when calling `payload`
463
- // methods, this means that with libpanic_abort, we don't format
464
- // the string at all!
463
+ // methods, this means we avoid formatting the string at all!
464
+ // (The panic runtime might still call `payload.take_box()` though and trigger
465
+ // formatting.)
465
466
Hook :: Default if panic_output ( ) . is_none ( ) => { }
466
467
Hook :: Default => {
467
468
info. set_payload ( payload. get ( ) ) ;
You can’t perform that action at this time.
0 commit comments