forked from Kotlin/kotlinx.coroutines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
isInstalledStatically
field to a separate object (Kotlin#2913)
By doing this DebugProbesImpl can check for static installation without having to depend on AgentPremain, which is not compatible with Android. Co-authored-by: Pierfrancesco Soffritti <psoffritti@google.com>
- Loading branch information
1 parent
afac72e
commit 13cca94
Showing
3 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
kotlinx-coroutines-core/jvm/src/debug/internal/AgentInstallationType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package kotlinx.coroutines.debug.internal | ||
|
||
/** | ||
* Object used to differentiate between agent installed statically or dynamically. | ||
* This is done in a separate object so [DebugProbesImpl] can check for static installation | ||
* without having to depend on [kotlinx.coroutines.debug.AgentPremain], which is not compatible with Android. | ||
* Otherwise, access to `AgentPremain.isInstalledStatically` triggers the load of its internal `ClassFileTransformer` | ||
* that is not available on Android. | ||
*/ | ||
internal object AgentInstallationType { | ||
internal var isInstalledStatically = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters