Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index 062d27e495a341697e99ed4995907e68c844ed51..75cd5e4e4663a8f0e4a01f98504009d6b562da1e 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -9042,13 +9042,6 @@ void debug::PrepareStep(Isolate* v8_isolate, StepAction action) { |
| isolate->debug()->PrepareStep(static_cast<i::StepAction>(action)); |
| } |
| -void debug::ClearStepping(Isolate* v8_isolate) { |
| - i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
| - ENTER_V8(isolate); |
| - // Clear all current stepping setup. |
| - isolate->debug()->ClearStepping(); |
| -} |
| - |
| v8::Isolate* debug::Script::GetIsolate() const { |
| return reinterpret_cast<v8::Isolate*>(Utils::OpenHandle(this)->GetIsolate()); |
| } |
| @@ -9140,6 +9133,17 @@ bool debug::Script::IsWasm() const { |
| return Utils::OpenHandle(this)->type() == i::Script::TYPE_WASM; |
| } |
| +void debug::Script::BlackboxStateChanged() const { |
|
dgozman
2017/01/19 21:49:14
Why doesn't this get a bool parameter |blackboxed|
kozy
2017/01/20 02:32:36
After offline discussion we decided to try to intr
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| + i::HandleScope handle_scope(isolate); |
| + i::Handle<i::Script> script = Utils::OpenHandle(this); |
| + i::SharedFunctionInfo::ScriptIterator iterator(script); |
| + for (i::SharedFunctionInfo* info = iterator.Next(); info != nullptr; |
| + info = iterator.Next()) { |
| + info->set_computed_debug_is_blackboxed(false); |
| + } |
| +} |
| + |
| namespace { |
| int GetSmiValue(i::Handle<i::FixedArray> array, int index) { |
| return i::Smi::cast(array->get(index))->value(); |
| @@ -9328,6 +9332,24 @@ void debug::SetDebugEventListener(Isolate* v8_isolate, |
| isolate->debug()->SetDebugEventListener(listener); |
| } |
| +void debug::SetIsBlackboxedCallback(Isolate* v8_isolate, |
| + IsBlackboxedCallback callback, void* data) { |
| + i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
| + ENTER_V8(isolate); |
| + isolate->debug()->SetIsBlackboxedCallback(callback, data); |
| +} |
| + |
| +bool debug::HasUserFrameOnStack(Isolate* v8_isolate) { |
| + i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
| + ENTER_V8(isolate); |
| + 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; |
| +} |
| + |
| Local<String> CpuProfileNode::GetFunctionName() const { |
| const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
| i::Isolate* isolate = node->isolate(); |