Не подтверждена Коммит 47326f72 создал по автору Anton Erofeev's avatar Anton Erofeev Зафиксировано автором GitHub
Просмотр файлов

Remove use of Platform.isExperimentalMM (#4646)

владелец 4122cac3
/*
* Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.util
......@@ -23,11 +23,15 @@ public object PlatformUtils {
public val IS_DEVELOPMENT_MODE: Boolean = isDevelopmentMode
public val IS_NEW_MM_ENABLED: Boolean = isNewMemoryModel
@Deprecated(
"New memory model is now enabled by default. The property will be removed in the future.",
level = DeprecationLevel.WARNING,
replaceWith = ReplaceWith("true")
)
public val IS_NEW_MM_ENABLED: Boolean = true
}
internal expect val PlatformUtils.isDevelopmentMode: Boolean
internal expect val PlatformUtils.isNewMemoryModel: Boolean
public expect val PlatformUtils.platform: Platform
......
/*
* Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.util
......@@ -7,9 +7,6 @@ package io.ktor.util
internal actual val PlatformUtils.isDevelopmentMode: Boolean
get() = false
internal actual val PlatformUtils.isNewMemoryModel: Boolean
get() = true
internal fun hasNodeApi(): Boolean = js(
"""
(typeof process !== 'undefined'
......
/*
* Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.util
......@@ -11,6 +11,3 @@ public actual val PlatformUtils.platform: Platform
internal actual val PlatformUtils.isDevelopmentMode: Boolean
get() = System.getProperty(DEVELOPMENT_MODE_KEY)?.toBoolean() == true
internal actual val PlatformUtils.isNewMemoryModel: Boolean
get() = true
/*
* Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.util
......@@ -7,9 +7,5 @@ package io.ktor.util
internal actual val PlatformUtils.isDevelopmentMode: Boolean
get() = false
@OptIn(ExperimentalStdlibApi::class)
internal actual val PlatformUtils.isNewMemoryModel: Boolean
get() = isExperimentalMM()
public actual val PlatformUtils.platform: Platform
get() = Platform.Native
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать