mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
DevTools: Move Source
related code to dedicated source.rs
file (#36667)
Currently Source related code exists in watcher.rs and thread.rs. This change moves source-related code to a dedicated source.rs file. This is in preparation for adding support for showing source code in the Debugger > Source panel. - [x] Testing: These changes should not affect current functionality as it only moves the existing code - [x] Fixes: part of https://github.com/servo/servo/issues/36027 --------- Signed-off-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
parent
d661d4a620
commit
c16d86f7a4
4 changed files with 62 additions and 38 deletions
|
@ -19,7 +19,7 @@ use std::net::{Shutdown, TcpListener, TcpStream};
|
|||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
|
||||
use actors::thread::Source;
|
||||
use actors::source::SourceData;
|
||||
use base::id::{BrowsingContextId, PipelineId, WebViewId};
|
||||
use crossbeam_channel::{Receiver, Sender, unbounded};
|
||||
use devtools_traits::{
|
||||
|
@ -66,6 +66,7 @@ mod actors {
|
|||
pub mod process;
|
||||
pub mod reflow;
|
||||
pub mod root;
|
||||
pub mod source;
|
||||
pub mod stylesheets;
|
||||
pub mod tab;
|
||||
pub mod thread;
|
||||
|
@ -525,9 +526,11 @@ impl DevtoolsInstance {
|
|||
.clone();
|
||||
|
||||
let thread_actor = actors.find_mut::<ThreadActor>(&thread_actor_name);
|
||||
thread_actor.add_source(source_info.url.clone());
|
||||
thread_actor
|
||||
.source_manager
|
||||
.add_source(source_info.url.clone());
|
||||
|
||||
let source = Source {
|
||||
let source = SourceData {
|
||||
actor: thread_actor_name.clone(),
|
||||
url: source_info.url.to_string(),
|
||||
is_black_boxed: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue