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

Unified Diff: runtime/lib/async_patch.dart

Issue 2718353002: Revert "Track the 'awaiter return' call stack..." (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | runtime/observatory/tests/service/pause_on_unhandled_async_exceptions2_test.dart » ('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 2823b73460dda50feb67f9ad64d271a2719a406f..0dd99e01784cedaf278b890cba31687d2e708cde 100644
--- a/runtime/lib/async_patch.dart
+++ b/runtime/lib/async_patch.dart
@@ -45,10 +45,7 @@ Function _asyncErrorWrapperHelper(continuation) {
///
/// Returns the result of registering with `.then`.
Future _awaitHelper(
- var object,
- Function thenCallback,
- Function errorCallback,
- var awaiter) {
+ var object, Function thenCallback, Function errorCallback) {
if (object is! Future) {
object = new _Future().._setValue(object);
} else if (object is! _Future) {
@@ -62,20 +59,9 @@ Future _awaitHelper(
//
// We can only do this for our internal futures (the default implementation of
// all futures that are constructed by the `dart:async` library).
- object._awaiter = awaiter;
return object._thenNoZoneRegistration(thenCallback, errorCallback);
}
-// Called as part of the 'await for (...)' construct. Registers the
-// awaiter on the stream.
-void _asyncStarListenHelper(var object, var awaiter) {
- if (object is! _StreamImpl) {
- return;
- }
- // `object` is a `_StreamImpl`.
- object._awaiter = awaiter;
-}
-
// _AsyncStarStreamController is used by the compiler to implement
// async* generator functions.
class _AsyncStarStreamController {
@@ -87,14 +73,7 @@ class _AsyncStarStreamController {
bool isSuspendedAtYield = false;
Completer cancellationCompleter = null;
- Stream get stream {
- Stream local = controller.stream;
- if (local is! _StreamImpl) {
- return local;
- }
- local._generator = asyncStarBody;
- return local;
- }
+ Stream get stream => controller.stream;
void runBody() {
isScheduled = false;
@@ -215,23 +194,10 @@ class _AsyncStarStreamController {
@patch void _rethrow(Object error, StackTrace stackTrace) native "Async_rethrow";
-@patch class _Future<T> {
- /// The closure implementing the async[*]-body that is `await`ing this future.
- Function _awaiter;
-}
-
-@patch class _StreamImpl<T> {
- /// The closure implementing the async[*]-body that is `await`ing this future.
- Function _awaiter;
- /// The closure implementing the async-generator body that is creating events
- /// for this stream.
- Function _generator;
-}
/// Returns a [StackTrace] object containing the synchronous prefix for this
/// asynchronous method.
-Object _asyncStackTraceHelper()
- native "StackTrace_asyncStackTraceHelper";
+Object _asyncStackTraceHelper() native "StackTrace_asyncStackTraceHelper";
void _clearAsyncThreadStackTrace()
native "StackTrace_clearAsyncThreadStackTrace";
« no previous file with comments | « no previous file | runtime/observatory/tests/service/pause_on_unhandled_async_exceptions2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698