Add flag to send live updates to devtools.

This commit is contained in:
Sagar Muchhal 2015-02-05 19:19:38 +00:00 committed by Josh Matthews
parent 0beb070d48
commit 5345edf51e
5 changed files with 17 additions and 1 deletions

View file

@ -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
}