mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add flag to send live updates to devtools.
This commit is contained in:
parent
0beb070d48
commit
5345edf51e
5 changed files with 17 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
use actor::{Actor, ActorRegistry};
|
||||
use actors::console::ConsoleActor;
|
||||
use devtools_traits::WantsLiveNotifications;
|
||||
use protocol::JsonPacketStream;
|
||||
|
||||
use serialize::json;
|
||||
|
@ -99,6 +100,7 @@ impl Actor for TabActor {
|
|||
let console_actor = registry.find::<ConsoleActor>(self.console.as_slice());
|
||||
console_actor.streams.borrow_mut().push(stream.clone());
|
||||
stream.write_json_packet(&msg);
|
||||
console_actor.script_chan.send(WantsLiveNotifications(console_actor.pipeline, true));
|
||||
true
|
||||
}
|
||||
|
||||
|
@ -112,6 +114,7 @@ impl Actor for TabActor {
|
|||
let console_actor = registry.find::<ConsoleActor>(self.console.as_slice());
|
||||
console_actor.streams.borrow_mut().pop();
|
||||
stream.write_json_packet(&msg);
|
||||
console_actor.script_chan.send(WantsLiveNotifications(console_actor.pipeline, false));
|
||||
true
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue