mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Manually extinguish multi-line use statements.
This commit is contained in:
parent
212b3e1311
commit
bd9c53c5da
19 changed files with 46 additions and 67 deletions
|
@ -5,10 +5,7 @@
|
|||
//! Global style data
|
||||
|
||||
use crate::context::StyleSystemOptions;
|
||||
use crate::gecko_bindings::bindings::Gecko_SetJemallocThreadLocalArena;
|
||||
use crate::gecko_bindings::bindings::{
|
||||
Gecko_RegisterProfilerThread, Gecko_UnregisterProfilerThread,
|
||||
};
|
||||
use crate::gecko_bindings::bindings;
|
||||
use crate::parallel::STYLE_THREAD_STACK_SIZE_KB;
|
||||
use crate::shared_lock::SharedRwLock;
|
||||
use crate::thread_state;
|
||||
|
@ -43,20 +40,20 @@ fn thread_name(index: usize) -> String {
|
|||
fn thread_startup(index: usize) {
|
||||
thread_state::initialize_layout_worker_thread();
|
||||
unsafe {
|
||||
Gecko_SetJemallocThreadLocalArena(true);
|
||||
bindings::Gecko_SetJemallocThreadLocalArena(true);
|
||||
}
|
||||
let name = thread_name(index);
|
||||
let name = CString::new(name).unwrap();
|
||||
unsafe {
|
||||
// Gecko_RegisterProfilerThread copies the passed name here.
|
||||
Gecko_RegisterProfilerThread(name.as_ptr());
|
||||
bindings::Gecko_RegisterProfilerThread(name.as_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
fn thread_shutdown(_: usize) {
|
||||
unsafe {
|
||||
Gecko_UnregisterProfilerThread();
|
||||
Gecko_SetJemallocThreadLocalArena(false);
|
||||
bindings::Gecko_UnregisterProfilerThread();
|
||||
bindings::Gecko_SetJemallocThreadLocalArena(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue