| Index: src/api.cc
 | 
| diff --git a/src/api.cc b/src/api.cc
 | 
| index 2ef82dcb73bc184c5adeb20247de0d3ac9a45077..e9c01a2ff26337a7330bc83811024aa799ac2b64 100644
 | 
| --- a/src/api.cc
 | 
| +++ b/src/api.cc
 | 
| @@ -9050,11 +9050,15 @@ void debug::PrepareStep(Isolate* v8_isolate, StepAction action) {
 | 
|    isolate->debug()->PrepareStep(static_cast<i::StepAction>(action));
 | 
|  }
 | 
|  
 | 
| -void debug::ClearStepping(Isolate* v8_isolate) {
 | 
| +bool debug::HasNonBlackboxedFrameOnStack(Isolate* v8_isolate) {
 | 
|    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
 | 
|    ENTER_V8(isolate);
 | 
| -  // Clear all current stepping setup.
 | 
| -  isolate->debug()->ClearStepping();
 | 
| +  for (i::StackTraceFrameIterator it(isolate); !it.done(); it.Advance()) {
 | 
| +    if (!it.is_javascript()) continue;
 | 
| +    if (!it.javascript_frame()->function()->shared()->DebugIsBlackboxed())
 | 
| +      return true;
 | 
| +  }
 | 
| +  return false;
 | 
|  }
 | 
|  
 | 
|  v8::Isolate* debug::Script::GetIsolate() const {
 | 
| @@ -9329,11 +9333,22 @@ MaybeLocal<UnboundScript> debug::CompileInspectorScript(Isolate* v8_isolate,
 | 
|    RETURN_ESCAPED(ToApiHandle<UnboundScript>(result));
 | 
|  }
 | 
|  
 | 
| -void debug::SetDebugEventListener(Isolate* v8_isolate,
 | 
| -                                  debug::DebugEventListener* listener) {
 | 
| +void debug::SetDebugDelegate(Isolate* v8_isolate,
 | 
| +                             debug::DebugDelegate* delegate) {
 | 
| +  i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
 | 
| +  ENTER_V8(isolate);
 | 
| +  isolate->debug()->SetDebugDelegate(delegate);
 | 
| +}
 | 
| +
 | 
| +void debug::ResetBlackboxedStateCache(Isolate* v8_isolate,
 | 
| +                                      v8::Local<debug::Script> script) {
 | 
|    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
 | 
|    ENTER_V8(isolate);
 | 
| -  isolate->debug()->SetDebugEventListener(listener);
 | 
| +  i::DisallowHeapAllocation no_gc;
 | 
| +  i::SharedFunctionInfo::ScriptIterator iter(Utils::OpenHandle(*script));
 | 
| +  while (i::SharedFunctionInfo* info = iter.Next()) {
 | 
| +    info->set_computed_debug_is_blackboxed(false);
 | 
| +  }
 | 
|  }
 | 
|  
 | 
|  Local<String> CpuProfileNode::GetFunctionName() const {
 | 
| 
 |