Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import "dart:_internal" hide Symbol; | 5 import "dart:_internal" hide Symbol; |
| 6 | 6 |
| 7 // Equivalent of calling FATAL from C++ code. | 7 // Equivalent of calling FATAL from C++ code. |
| 8 _fatal(msg) native "DartAsync_fatal"; | 8 _fatal(msg) native "DartAsync_fatal"; |
| 9 | 9 |
| 10 // We need to pass the value as first argument and leave the second and third | 10 // We need to pass the value as first argument and leave the second and third |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 @patch | 235 @patch |
| 236 class _StreamImpl<T> { | 236 class _StreamImpl<T> { |
| 237 /// The closure implementing the async[*]-body that is `await`ing this future. | 237 /// The closure implementing the async[*]-body that is `await`ing this future. |
| 238 Function _awaiter; | 238 Function _awaiter; |
| 239 | 239 |
| 240 /// The closure implementing the async-generator body that is creating events | 240 /// The closure implementing the async-generator body that is creating events |
| 241 /// for this stream. | 241 /// for this stream. |
| 242 Function _generator; | 242 Function _generator; |
| 243 } | 243 } |
| 244 | 244 |
| 245 void _completeOnAsyncReturn(Object completer, [value]) { | |
|
rmacnak
2017/03/27 21:05:51
You always call this with both arguments, so don't
Cutch
2017/03/27 22:31:20
Done.
| |
| 246 completer.complete(value); | |
| 247 } | |
| 248 | |
| 245 /// Returns a [StackTrace] object containing the synchronous prefix for this | 249 /// Returns a [StackTrace] object containing the synchronous prefix for this |
| 246 /// asynchronous method. | 250 /// asynchronous method. |
| 247 Object _asyncStackTraceHelper(Function async_op) | 251 Object _asyncStackTraceHelper(Function async_op) |
| 248 native "StackTrace_asyncStackTraceHelper"; | 252 native "StackTrace_asyncStackTraceHelper"; |
| 249 | 253 |
| 250 void _clearAsyncThreadStackTrace() | 254 void _clearAsyncThreadStackTrace() |
| 251 native "StackTrace_clearAsyncThreadStackTrace"; | 255 native "StackTrace_clearAsyncThreadStackTrace"; |
| 252 | 256 |
| 253 void _setAsyncThreadStackTrace(StackTrace stackTrace) | 257 void _setAsyncThreadStackTrace(StackTrace stackTrace) |
| 254 native "StackTrace_setAsyncThreadStackTrace"; | 258 native "StackTrace_setAsyncThreadStackTrace"; |
| 255 | 259 |
| 256 void _moveNextDebuggerStepCheck(Function async_op) | 260 void _moveNextDebuggerStepCheck(Function async_op) |
| 257 native "AsyncStarMoveNext_debuggerStepCheck"; | 261 native "AsyncStarMoveNext_debuggerStepCheck"; |
| OLD | NEW |