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

Unified Diff: runtime/lib/async_patch.dart

Issue 2768103002: Debugger support for step-into async and async* functions. (Closed)
Patch Set: asiva 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
« no previous file with comments | « runtime/lib/async.cc ('k') | runtime/lib/async_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/async_patch.dart
diff --git a/runtime/lib/async_patch.dart b/runtime/lib/async_patch.dart
index 8cfcaa053d806399d44ac1b4d8cdbf7812dc3fdc..13cc9b81f240dce2aa623232dac25b32d57b8b13 100644
--- a/runtime/lib/async_patch.dart
+++ b/runtime/lib/async_patch.dart
@@ -73,6 +73,18 @@ void _asyncStarListenHelper(var object, var awaiter) {
object._awaiter = awaiter;
}
+void _asyncStarMoveNextHelper(var stream) {
+ if (stream is! _StreamImpl) {
+ return;
+ }
+ // stream is a _StreamImpl.
+ if (stream._generator == null) {
+ // No generator registered, this isn't an async* Stream.
+ return;
+ }
+ _moveNextDebuggerStepCheck(stream._generator);
+}
+
// _AsyncStarStreamController is used by the compiler to implement
// async* generator functions.
class _AsyncStarStreamController {
@@ -232,10 +244,14 @@ class _StreamImpl<T> {
/// Returns a [StackTrace] object containing the synchronous prefix for this
/// asynchronous method.
-Object _asyncStackTraceHelper() native "StackTrace_asyncStackTraceHelper";
+Object _asyncStackTraceHelper(Function async_op)
+ native "StackTrace_asyncStackTraceHelper";
void _clearAsyncThreadStackTrace()
native "StackTrace_clearAsyncThreadStackTrace";
void _setAsyncThreadStackTrace(StackTrace stackTrace)
native "StackTrace_setAsyncThreadStackTrace";
+
+void _moveNextDebuggerStepCheck(Function async_op)
+ native "AsyncStarMoveNext_debuggerStepCheck";
« no previous file with comments | « runtime/lib/async.cc ('k') | runtime/lib/async_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698