зеркало из https://github.com/mozilla/glean.git
Add the rlb dispatcher flush
Special API that is C-FFI-like exported from the RLB later.
This commit is contained in:
Родитель
53a1da03e4
Коммит
86e89e936b
|
@ -438,6 +438,26 @@ pub fn persist_ping_lifetime_data() {
|
|||
});
|
||||
}
|
||||
|
||||
/// Unblock the global dispatcher to start processing queued tasks.
|
||||
pub extern "C" fn rlb_flush_dispatcher() {
|
||||
let was_initialized = was_initialize_called();
|
||||
|
||||
// Panic in debug mode
|
||||
debug_assert!(!was_initialized);
|
||||
|
||||
// In release do a check and bail out
|
||||
if was_initialized {
|
||||
log::error!(
|
||||
"Tried to flush the dispatcher from outside, but Glean was initialized in the RLB."
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if let Err(err) = dispatcher::flush_init() {
|
||||
log::error!("Unable to flush the preinit queue: {}", err);
|
||||
}
|
||||
}
|
||||
|
||||
fn initialize_core_metrics(glean: &Glean, client_info: &ClientInfoMetrics) {
|
||||
core_metrics::internal_metrics::app_build.set_sync(glean, &client_info.app_build[..]);
|
||||
core_metrics::internal_metrics::app_display_version
|
||||
|
|
Загрузка…
Ссылка в новой задаче