Ignore eager JS evaluation in devtools.

This commit is contained in:
Josh Matthews 2020-04-28 15:40:02 -04:00
parent 3dfec95268
commit b53ce5c79a

View file

@ -443,6 +443,13 @@ impl Actor for ConsoleActor {
// Emit an eager reply so that the client starts listening // Emit an eager reply so that the client starts listening
// for an async event with the resultID // for an async event with the resultID
stream.write_json_packet(&early_reply); stream.write_json_packet(&early_reply);
if msg.get("eager").and_then(|v| v.as_bool()).unwrap_or(false) {
// We don't support the side-effect free evaluation that eager evalaution
// really needs.
return Ok(ActorMessageStatus::Processed);
}
let reply = self.evaluateJS(&registry, &msg).unwrap(); let reply = self.evaluateJS(&registry, &msg).unwrap();
let msg = EvaluateJSEvent { let msg = EvaluateJSEvent {
from: self.name(), from: self.name(),