mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Removed util.
This commit is contained in:
parent
01b6ad55bd
commit
9be4fd56ce
133 changed files with 396 additions and 352 deletions
|
@ -38,8 +38,8 @@ use std::mem::replace;
|
|||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::mpsc::{Receiver, RecvError, Select, Sender, channel};
|
||||
use std::thread;
|
||||
use style::thread_state;
|
||||
use util::thread::spawn_named;
|
||||
|
||||
/// Set the `worker` field of a related DedicatedWorkerGlobalScope object to a particular
|
||||
/// value for the duration of this object's lifetime. This ensures that the related Worker
|
||||
|
@ -160,7 +160,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
let name = format!("WebWorker for {}", serialized_worker_url);
|
||||
let top_level_frame_id = FrameId::installed();
|
||||
|
||||
spawn_named(name, move || {
|
||||
thread::Builder::new().name(name).spawn(move || {
|
||||
thread_state::initialize(thread_state::SCRIPT | thread_state::IN_WORKER);
|
||||
|
||||
if let Some(top_level_frame_id) = top_level_frame_id {
|
||||
|
@ -243,7 +243,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
global.handle_event(event);
|
||||
}
|
||||
}, reporter_name, parent_sender, CommonScriptMsg::CollectReports);
|
||||
});
|
||||
}).expect("Thread spawning failed");
|
||||
}
|
||||
|
||||
pub fn script_chan(&self) -> Box<ScriptChan + Send> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue