Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: src/interpreter/interpreter.cc

Issue 2067503002: [debugger] fix stepping over await calls for ignition generators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@test
Patch Set: address comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 5a5ce40d8144ee7fac3bb39574345eaad7722a4f..1ba343bc82080830e0e0a11f1c66b850fd0be101 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1792,6 +1792,11 @@ void Interpreter::DoSuspendGenerator(InterpreterAssembler* assembler) {
Node* generator_reg = __ BytecodeOperandReg(0);
Node* generator = __ LoadRegister(generator_reg);
+ Node* debug_step = __ DebugSteppingAcrossAwait();
+ Label if_stepping(assembler, Label::kDeferred), ok(assembler);
+ __ BranchIf(debug_step, &if_stepping, &ok);
+ __ Bind(&ok);
+
Node* array =
__ LoadObjectField(generator, JSGeneratorObject::kOperandStackOffset);
Node* context = __ GetContext();
@@ -1802,6 +1807,13 @@ void Interpreter::DoSuspendGenerator(InterpreterAssembler* assembler) {
__ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, state);
__ Dispatch();
+
+ __ Bind(&if_stepping);
+ {
+ Node* context = __ GetContext();
+ __ CallRuntime(Runtime::kDebugRecordAsyncFunction, context, generator);
+ __ Goto(&ok);
+ }
}
// ResumeGenerator <generator>

Powered by Google App Engine
This is Rietveld 408576698