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

Unified Diff: runtime/lib/stacktrace.cc

Issue 2768103002: Debugger support for step-into async and async* functions. (Closed)
Patch Set: rmacnak review Created 3 years, 9 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: runtime/lib/stacktrace.cc
diff --git a/runtime/lib/stacktrace.cc b/runtime/lib/stacktrace.cc
index 7f9c146b5d68f9ab9eba8d6c30e74a74b862b2ef..0fc6071e872ff3d084281a30eb4011802b136ccf 100644
--- a/runtime/lib/stacktrace.cc
+++ b/runtime/lib/stacktrace.cc
@@ -110,11 +110,30 @@ DEFINE_NATIVE_ENTRY(StackTrace_current, 0) {
}
-DEFINE_NATIVE_ENTRY(StackTrace_asyncStackTraceHelper, 0) {
+DEFINE_NATIVE_ENTRY(StackTrace_asyncStackTraceHelper, 1) {
+ GET_NON_NULL_NATIVE_ARGUMENT(Closure, async_op, arguments->NativeArgAt(0));
+ if (FLAG_support_debugger) {
+ Debugger* debugger = isolate->debugger();
+ if (debugger != NULL) {
+ debugger->MaybeAsyncStepInto(async_op);
+ }
+ }
return CurrentStackTrace(thread, true);
}
+DEFINE_NATIVE_ENTRY(AsyncStarMoveNext_debuggerStepCheck, 1) {
+ GET_NON_NULL_NATIVE_ARGUMENT(Closure, async_op, arguments->NativeArgAt(0));
+ if (FLAG_support_debugger) {
+ Debugger* debugger = isolate->debugger();
+ if (debugger != NULL) {
+ debugger->MaybeAsyncStepInto(async_op);
+ }
+ }
+ return Object::null();
+}
siva 2017/03/23 22:37:01 Why did you include this function here and not sta
Cutch 2017/03/24 14:55:39 Done.
+
+
DEFINE_NATIVE_ENTRY(StackTrace_clearAsyncThreadStackTrace, 0) {
thread->clear_async_stack_trace();
return Object::null();

Powered by Google App Engine
This is Rietveld 408576698