diff options
Diffstat (limited to 'cli/tools/repl/session.rs')
-rw-r--r-- | cli/tools/repl/session.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cli/tools/repl/session.rs b/cli/tools/repl/session.rs index e3bdac3b2..361f5abb5 100644 --- a/cli/tools/repl/session.rs +++ b/cli/tools/repl/session.rs @@ -92,17 +92,19 @@ impl ReplSession { for notification in session.notifications() { let method = notification.get("method").unwrap().as_str().unwrap(); let params = notification.get("params").unwrap(); - if method == "Runtime.executionContextCreated" { - context_id = params - .get("context") + let context = params.get("context").unwrap(); + assert!(context + .get("auxData") .unwrap() - .get("id") + .get("isDefault") .unwrap() - .as_u64() - .unwrap(); + .as_bool() + .unwrap()); + context_id = context.get("id").unwrap().as_u64().unwrap(); } } + assert_ne!(context_id, 0); let mut repl_session = ReplSession { worker, |