Commit b87586d2 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[inspector] Fix async stepping throw extension code.

When async stepping through code where only extension scripts are on the
stack, we the iterator is not gonna yield any frames, since it ignores
all extension frames.

Bug: chromium:1045863
Change-Id: Ifdb966e47bf1d090fa695d066003c7aff343f658
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033167
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66069}
parent 2ee598ae
...@@ -295,7 +295,10 @@ bool V8Debugger::asyncStepOutOfFunction(int targetContextGroupId, ...@@ -295,7 +295,10 @@ bool V8Debugger::asyncStepOutOfFunction(int targetContextGroupId,
bool onlyAtReturn) { bool onlyAtReturn) {
v8::HandleScope handleScope(m_isolate); v8::HandleScope handleScope(m_isolate);
auto iterator = v8::debug::StackTraceIterator::Create(m_isolate); auto iterator = v8::debug::StackTraceIterator::Create(m_isolate);
CHECK(!iterator->Done()); // When stepping through extensions code, it is possible that the
// iterator doesn't have any frames, since we exclude all frames
// that correspond to extension scripts.
if (iterator->Done()) return false;
bool atReturn = !iterator->GetReturnValue().IsEmpty(); bool atReturn = !iterator->GetReturnValue().IsEmpty();
iterator->Advance(); iterator->Advance();
// Synchronous stack has more then one frame. // Synchronous stack has more then one frame.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment