@@ -63,9 +63,11 @@ void V8Debugger::enable() {
6363 if (m_enableCount++) return ;
6464 DCHECK (!enabled ());
6565 v8::HandleScope scope (m_isolate);
66- v8::Debug::SetDebugEventListener (m_isolate, &V8Debugger::v8DebugEventCallback,
67- v8::External::New (m_isolate, this ));
68- m_debuggerContext.Reset (m_isolate, v8::Debug::GetDebugContext (m_isolate));
66+ v8::DebugInterface::SetDebugEventListener (m_isolate,
67+ &V8Debugger::v8DebugEventCallback,
68+ v8::External::New (m_isolate, this ));
69+ m_debuggerContext.Reset (m_isolate,
70+ v8::DebugInterface::GetDebugContext (m_isolate));
6971 compileDebuggerScript ();
7072}
7173
@@ -76,7 +78,7 @@ void V8Debugger::disable() {
7678 m_debuggerScript.Reset ();
7779 m_debuggerContext.Reset ();
7880 allAsyncTasksCanceled ();
79- v8::Debug ::SetDebugEventListener (m_isolate, nullptr );
81+ v8::DebugInterface ::SetDebugEventListener (m_isolate, nullptr );
8082}
8183
8284bool V8Debugger::enabled () const { return !m_debuggerScript.IsEmpty (); }
@@ -171,7 +173,7 @@ String16 V8Debugger::setBreakpoint(const String16& sourceID,
171173 ->Get (context, toV8StringInternalized (m_isolate, " setBreakpoint" ))
172174 .ToLocalChecked ());
173175 v8::Local<v8::Value> breakpointId =
174- v8::Debug ::Call (debuggerContext (), setBreakpointFunction, info)
176+ v8::DebugInterface ::Call (debuggerContext (), setBreakpointFunction, info)
175177 .ToLocalChecked ();
176178 if (!breakpointId->IsString ()) return " " ;
177179 *actualLineNumber =
@@ -206,7 +208,7 @@ void V8Debugger::removeBreakpoint(const String16& breakpointId) {
206208 ->Get (context,
207209 toV8StringInternalized (m_isolate, " removeBreakpoint" ))
208210 .ToLocalChecked ());
209- v8::Debug ::Call (debuggerContext (), removeBreakpointFunction, info)
211+ v8::DebugInterface ::Call (debuggerContext (), removeBreakpointFunction, info)
210212 .ToLocalChecked ();
211213}
212214
@@ -219,7 +221,8 @@ void V8Debugger::clearBreakpoints() {
219221 m_debuggerScript.Get (m_isolate)
220222 ->Get (context, toV8StringInternalized (m_isolate, " clearBreakpoints" ))
221223 .ToLocalChecked ());
222- v8::Debug::Call (debuggerContext (), clearBreakpoints).ToLocalChecked ();
224+ v8::DebugInterface::Call (debuggerContext (), clearBreakpoints)
225+ .ToLocalChecked ();
223226}
224227
225228void V8Debugger::setBreakpointsActivated (bool activated) {
@@ -243,7 +246,7 @@ void V8Debugger::setBreakpointsActivated(bool activated) {
243246 ->Get (context, toV8StringInternalized (m_isolate,
244247 " setBreakpointsActivated" ))
245248 .ToLocalChecked ());
246- v8::Debug ::Call (debuggerContext (), setBreakpointsActivated, info)
249+ v8::DebugInterface ::Call (debuggerContext (), setBreakpointsActivated, info)
247250 .ToLocalChecked ();
248251
249252 m_breakpointsActivated = activated;
@@ -276,9 +279,9 @@ void V8Debugger::setPauseOnExceptionsState(
276279void V8Debugger::setPauseOnNextStatement (bool pause) {
277280 if (m_runningNestedMessageLoop) return ;
278281 if (pause)
279- v8::Debug ::DebugBreak (m_isolate);
282+ v8::DebugInterface ::DebugBreak (m_isolate);
280283 else
281- v8::Debug ::CancelDebugBreak (m_isolate);
284+ v8::DebugInterface ::CancelDebugBreak (m_isolate);
282285}
283286
284287bool V8Debugger::canBreakProgram () {
@@ -306,7 +309,7 @@ void V8Debugger::breakProgram() {
306309 v8::ConstructorBehavior::kThrow )
307310 .ToLocal (&breakFunction))
308311 return ;
309- v8::Debug ::Call (debuggerContext (), breakFunction).ToLocalChecked ();
312+ v8::DebugInterface ::Call (debuggerContext (), breakFunction).ToLocalChecked ();
310313}
311314
312315void V8Debugger::continueProgram () {
@@ -359,11 +362,11 @@ bool V8Debugger::setScriptSource(
359362 class EnableLiveEditScope {
360363 public:
361364 explicit EnableLiveEditScope (v8::Isolate* isolate) : m_isolate(isolate) {
362- v8::Debug ::SetLiveEditEnabled (m_isolate, true );
365+ v8::DebugInterface ::SetLiveEditEnabled (m_isolate, true );
363366 inLiveEditScope = true ;
364367 }
365368 ~EnableLiveEditScope () {
366- v8::Debug ::SetLiveEditEnabled (m_isolate, false );
369+ v8::DebugInterface ::SetLiveEditEnabled (m_isolate, false );
367370 inLiveEditScope = false ;
368371 }
369372
@@ -459,8 +462,8 @@ JavaScriptCallFrames V8Debugger::currentCallFrames(int limit) {
459462 toV8StringInternalized (m_isolate, " currentCallFrames" ))
460463 .ToLocalChecked ());
461464 currentCallFramesV8 =
462- v8::Debug ::Call (debuggerContext (), currentCallFramesFunction,
463- v8::Integer::New (m_isolate, limit))
465+ v8::DebugInterface ::Call (debuggerContext (), currentCallFramesFunction,
466+ v8::Integer::New (m_isolate, limit))
464467 .ToLocalChecked ();
465468 } else {
466469 v8::Local<v8::Value> argv[] = {m_executionState,
@@ -559,7 +562,7 @@ void V8Debugger::handleProgramBreak(v8::Local<v8::Context> pausedContext,
559562}
560563
561564void V8Debugger::v8DebugEventCallback (
562- const v8::Debug ::EventDetails& eventDetails) {
565+ const v8::DebugInterface ::EventDetails& eventDetails) {
563566 V8Debugger* thisPtr = toV8Debugger (eventDetails.GetCallbackData ());
564567 thisPtr->handleV8DebugEvent (eventDetails);
565568}
@@ -580,7 +583,7 @@ v8::Local<v8::Value> V8Debugger::callInternalGetterFunction(
580583}
581584
582585void V8Debugger::handleV8DebugEvent (
583- const v8::Debug ::EventDetails& eventDetails) {
586+ const v8::DebugInterface ::EventDetails& eventDetails) {
584587 if (!enabled ()) return ;
585588 v8::DebugEvent event = eventDetails.GetEvent ();
586589 if (event != v8::AsyncTaskEvent && event != v8::Break &&
@@ -729,7 +732,8 @@ v8::MaybeLocal<v8::Value> V8Debugger::functionScopes(
729732v8::MaybeLocal<v8::Array> V8Debugger::internalProperties (
730733 v8::Local<v8::Context> context, v8::Local<v8::Value> value) {
731734 v8::Local<v8::Array> properties;
732- if (!v8::Debug::GetInternalProperties (m_isolate, value).ToLocal (&properties))
735+ if (!v8::DebugInterface::GetInternalProperties (m_isolate, value)
736+ .ToLocal (&properties))
733737 return v8::MaybeLocal<v8::Array>();
734738 if (value->IsFunction ()) {
735739 v8::Local<v8::Function> function = value.As <v8::Function>();
0 commit comments