mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update devtools server for Firefox 71.
This commit is contained in:
parent
b3b72cb9e3
commit
84074d3c86
9 changed files with 339 additions and 21 deletions
|
@ -8,11 +8,15 @@ use serde_json::{Map, Value};
|
|||
use std::net::TcpStream;
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct ThreadAttachedReply {
|
||||
struct ThreadAttached {
|
||||
from: String,
|
||||
#[serde(rename = "type")]
|
||||
type_: String,
|
||||
actor: String,
|
||||
frame: u32,
|
||||
error: u32,
|
||||
recordingEndpoint: u32,
|
||||
executionPoint: u32,
|
||||
poppedFrames: Vec<PoppedFrameMsg>,
|
||||
why: WhyMsg,
|
||||
}
|
||||
|
@ -54,6 +58,11 @@ struct SourcesReply {
|
|||
#[derive(Serialize)]
|
||||
enum Source {}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct VoidAttachedReply {
|
||||
from: String,
|
||||
}
|
||||
|
||||
pub struct ThreadActor {
|
||||
name: String,
|
||||
}
|
||||
|
@ -78,16 +87,21 @@ impl Actor for ThreadActor {
|
|||
) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"attach" => {
|
||||
let msg = ThreadAttachedReply {
|
||||
let msg = ThreadAttached {
|
||||
from: self.name(),
|
||||
type_: "paused".to_owned(),
|
||||
actor: registry.new_name("pause"),
|
||||
frame: 0,
|
||||
error: 0,
|
||||
recordingEndpoint: 0,
|
||||
executionPoint: 0,
|
||||
poppedFrames: vec![],
|
||||
why: WhyMsg {
|
||||
type_: "attached".to_owned(),
|
||||
},
|
||||
};
|
||||
stream.write_json_packet(&msg);
|
||||
stream.write_json_packet(&VoidAttachedReply { from: self.name() });
|
||||
ActorMessageStatus::Processed
|
||||
},
|
||||
|
||||
|
@ -97,6 +111,7 @@ impl Actor for ThreadActor {
|
|||
type_: "resumed".to_owned(),
|
||||
};
|
||||
stream.write_json_packet(&msg);
|
||||
stream.write_json_packet(&VoidAttachedReply { from: self.name() });
|
||||
ActorMessageStatus::Processed
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue