From b53ce5c79a6744d24002467e1ff7b7b80e169f36 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 28 Apr 2020 15:40:02 -0400 Subject: [PATCH] Ignore eager JS evaluation in devtools. --- components/devtools/actors/console.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/devtools/actors/console.rs b/components/devtools/actors/console.rs index 505256d970c..2a8b016b93d 100644 --- a/components/devtools/actors/console.rs +++ b/components/devtools/actors/console.rs @@ -443,6 +443,13 @@ impl Actor for ConsoleActor { // Emit an eager reply so that the client starts listening // for an async event with the resultID 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(®istry, &msg).unwrap(); let msg = EvaluateJSEvent { from: self.name(),