File tree 2 files changed +3
-6
lines changed
kotlinx-coroutines-core/jvm/src/debug
2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,11 @@ import java.security.*
21
21
@IgnoreJRERequirement // Never touched on Android
22
22
internal object AgentPremain {
23
23
24
- private val enableCreationStackTraces = runCatching {
25
- System .getProperty(" kotlinx.coroutines.debug.enable.creation.stack.trace" )?.toBoolean()
26
- }.getOrNull() ? : DebugProbesImpl .enableCreationStackTraces
27
-
28
24
@JvmStatic
29
25
@Suppress(" UNUSED_PARAMETER" )
30
26
fun premain (args : String? , instrumentation : Instrumentation ) {
31
27
AgentInstallationType .isInstalledStatically = true
32
28
instrumentation.addTransformer(DebugProbesTransformer )
33
- DebugProbesImpl .enableCreationStackTraces = enableCreationStackTraces
34
29
DebugProbesImpl .install()
35
30
installSignalHandler()
36
31
}
Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ internal object DebugProbesImpl {
40
40
private val sequenceNumber = atomic(0L )
41
41
42
42
public var sanitizeStackTraces: Boolean = true
43
- public var enableCreationStackTraces: Boolean = true
43
+ public var enableCreationStackTraces: Boolean = runCatching {
44
+ System .getProperty(" kotlinx.coroutines.debug.enable.creation.stack.trace" )?.toBoolean()
45
+ }.getOrNull() ? : true
44
46
45
47
/*
46
48
* Substitute for service loader, DI between core and debug modules.
You can’t perform that action at this time.
0 commit comments