File tree 2 files changed +15
-3
lines changed 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 {
328
328
V8NodeInspector (AgentImpl* agent, node::Environment* env,
329
329
v8::Platform* platform)
330
330
: agent_(agent),
331
- isolate_ (env-> isolate () ),
331
+ env_ (env),
332
332
platform_(platform),
333
333
terminated_(false ),
334
334
running_nested_loop_(false ),
@@ -348,7 +348,7 @@ class V8NodeInspector : public v8_inspector::V8InspectorClient {
348
348
Mutex::ScopedLock scoped_lock (agent_->pause_lock_ );
349
349
agent_->pause_cond_ .Wait (scoped_lock);
350
350
}
351
- while (v8::platform::PumpMessageLoop (platform_, isolate_ ))
351
+ while (v8::platform::PumpMessageLoop (platform_, env_-> isolate () ))
352
352
{}
353
353
} while (!terminated_);
354
354
terminated_ = false ;
@@ -376,13 +376,18 @@ class V8NodeInspector : public v8_inspector::V8InspectorClient {
376
376
session_->dispatchProtocolMessage (message);
377
377
}
378
378
379
+ v8::Local<v8::Context> ensureDefaultContextInGroup (int contextGroupId)
380
+ override {
381
+ return env_->context ();
382
+ }
383
+
379
384
V8Inspector* inspector () {
380
385
return inspector_.get ();
381
386
}
382
387
383
388
private:
384
389
AgentImpl* agent_;
385
- v8::Isolate* isolate_ ;
390
+ node::Environment* env_ ;
386
391
v8::Platform* platform_;
387
392
bool terminated_;
388
393
bool running_nested_loop_;
Original file line number Diff line number Diff line change @@ -141,6 +141,13 @@ function testInspectScope(session) {
141
141
}
142
142
} , setupExpectValue ( 1002 )
143
143
] ,
144
+ [
145
+ {
146
+ 'method' : 'Runtime.evaluate' , 'params' : {
147
+ 'expression' : '5 * 5'
148
+ }
149
+ } , ( message ) => assert . strictEqual ( 25 , message [ 'result' ] [ 'value' ] )
150
+ ] ,
144
151
] ) ;
145
152
}
146
153
You can’t perform that action at this time.
0 commit comments