diff --git a/components/devtools/lib.rs b/components/devtools/lib.rs index 90e9718728a..e2d06a7665b 100644 --- a/components/devtools/lib.rs +++ b/components/devtools/lib.rs @@ -114,6 +114,8 @@ fn run_server(sender: Sender, let mut actor_pipelines: HashMap = HashMap::new(); + let mut actor_workers: HashMap<(PipelineId, WorkerId), String> = HashMap::new(); + /// Process the input from a single devtools client until EOF. fn handle_client(actors: Arc>, mut stream: TcpStream) { @@ -152,13 +154,12 @@ fn run_server(sender: Sender, ids: (PipelineId, Option), scriptSender: Sender, actor_pipelines: &mut HashMap, + actor_workers: &mut HashMap<(PipelineId, WorkerId), String>, page_info: DevtoolsPageInfo) { let mut actors = actors.lock().unwrap(); let (pipeline, worker_id) = ids; - let mut actor_workers: HashMap<(PipelineId, WorkerId), String> = HashMap::new(); - //TODO: move all this actor creation into a constructor method on TabActor let (tab, console, inspector, timeline) = { let console = ConsoleActor { @@ -269,7 +270,7 @@ fn run_server(sender: Sender, Ok(DevtoolsControlMsg::ServerExitMsg) | Err(RecvError) => break, Ok(DevtoolsControlMsg::NewGlobal(ids, scriptSender, pageinfo)) => handle_new_global(actors.clone(), ids, scriptSender, &mut actor_pipelines, - pageinfo), + &mut actor_workers, pageinfo), Ok(DevtoolsControlMsg::SendConsoleMessage(id, console_message)) => handle_console_message(actors.clone(), id, console_message, &actor_pipelines),