зеркало из https://github.com/mozilla/glean.git
Reset all global state when destroying the Glean handle
After we destroy the Glean handle we should be conceptually in a clean state, just as if the app is just starting and loading Glean. And for Glean that means tasks should get queued up. Some tests explicitly toggle this already, but resetting it here does not seem to affect them.
This commit is contained in:
Родитель
47e78650d2
Коммит
2971286519
|
@ -776,8 +776,12 @@ open class GleanInternalAPI internal constructor () {
|
|||
}
|
||||
|
||||
LibGleanFFI.INSTANCE.glean_destroy_glean()
|
||||
initialized = false
|
||||
|
||||
// Reset all state.
|
||||
@Suppress("EXPERIMENTAL_API_USAGE")
|
||||
Dispatchers.API.setTaskQueueing(true)
|
||||
initFinished = false
|
||||
initialized = false
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче