mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
DevTools - add Interrupt method to ThreadActor
This commit is contained in:
parent
cdd7f0a658
commit
74e44078d7
1 changed files with 16 additions and 0 deletions
|
@ -33,6 +33,13 @@ struct ThreadResumedReply {
|
||||||
type_: String,
|
type_: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
struct ThreadInterruptedReply {
|
||||||
|
from: String,
|
||||||
|
#[serde(rename = "type")]
|
||||||
|
type_: String,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
struct ReconfigureReply {
|
struct ReconfigureReply {
|
||||||
from: String,
|
from: String,
|
||||||
|
@ -93,6 +100,15 @@ impl Actor for ThreadActor {
|
||||||
ActorMessageStatus::Processed
|
ActorMessageStatus::Processed
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"interrupt" => {
|
||||||
|
let msg = ThreadInterruptedReply {
|
||||||
|
from: self.name(),
|
||||||
|
type_: "interrupted".to_owned(),
|
||||||
|
};
|
||||||
|
stream.write_json_packet(&msg);
|
||||||
|
ActorMessageStatus::Processed
|
||||||
|
},
|
||||||
|
|
||||||
"reconfigure" => {
|
"reconfigure" => {
|
||||||
stream.write_json_packet(&ReconfigureReply { from: self.name() });
|
stream.write_json_packet(&ReconfigureReply { from: self.name() });
|
||||||
ActorMessageStatus::Processed
|
ActorMessageStatus::Processed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue