File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ class V8NodeInspector : public v8_inspector::V8InspectorClient {
328328 V8NodeInspector (AgentImpl* agent, node::Environment* env,
329329 v8::Platform* platform)
330330 : agent_(agent),
331- isolate_ (env-> isolate () ),
331+ env_ (env),
332332 platform_(platform),
333333 terminated_(false ),
334334 running_nested_loop_(false ),
@@ -348,7 +348,7 @@ class V8NodeInspector : public v8_inspector::V8InspectorClient {
348348 Mutex::ScopedLock scoped_lock (agent_->pause_lock_ );
349349 agent_->pause_cond_ .Wait (scoped_lock);
350350 }
351- while (v8::platform::PumpMessageLoop (platform_, isolate_ ))
351+ while (v8::platform::PumpMessageLoop (platform_, env_-> isolate () ))
352352 {}
353353 } while (!terminated_);
354354 terminated_ = false ;
@@ -376,13 +376,18 @@ class V8NodeInspector : public v8_inspector::V8InspectorClient {
376376 session_->dispatchProtocolMessage (message);
377377 }
378378
379+ v8::Local<v8::Context> ensureDefaultContextInGroup (int contextGroupId)
380+ override {
381+ return env_->context ();
382+ }
383+
379384 V8Inspector* inspector () {
380385 return inspector_.get ();
381386 }
382387
383388 private:
384389 AgentImpl* agent_;
385- v8::Isolate* isolate_ ;
390+ node::Environment* env_ ;
386391 v8::Platform* platform_;
387392 bool terminated_;
388393 bool running_nested_loop_;
Original file line number Diff line number Diff line change @@ -141,6 +141,13 @@ function testInspectScope(session) {
141141 }
142142 } , setupExpectValue ( 1002 )
143143 ] ,
144+ [
145+ {
146+ 'method' : 'Runtime.evaluate' , 'params' : {
147+ 'expression' : '5 * 5'
148+ }
149+ } , ( message ) => assert . strictEqual ( 25 , message [ 'result' ] [ 'value' ] )
150+ ] ,
144151 ] ) ;
145152}
146153
You can’t perform that action at this time.
0 commit comments