File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,16 @@ pub fn error_allocator<'gc>(
19
19
) -> Result < Object < ' gc > , Error < ' gc > > {
20
20
let base = ScriptObjectData :: new ( class) ;
21
21
22
- let call_stack = ( enabled ! ( Level :: INFO ) || cfg ! ( feature = "avm_debug" ) )
22
+ // See <https://docs.ruffle.rs/en_US/FlashPlatform/reference/actionscript/3/Error.html#getStackTrace()>
23
+ let stack_trace_enabled =
24
+ // For Flash Player 11.5+, stack traces are always enabled.
25
+ activation. context . player_version >= 18
26
+ // For Flash Player 11.4 and earlier, stack traces are only enabled in debug builds.
27
+ || cfg ! ( feature = "avm_debug" )
28
+ // But also allow enabling them with log level >= INFO.
29
+ || enabled ! ( Level :: INFO ) ;
30
+
31
+ let call_stack = stack_trace_enabled
23
32
. then ( || activation. avm2 ( ) . call_stack ( ) . borrow ( ) . clone ( ) )
24
33
. unwrap_or_default ( ) ;
25
34
You can’t perform that action at this time.
0 commit comments