| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 (function(global, utils, extrasUtils) { | 5 (function(global, utils, extrasUtils) { |
| 6 | 6 |
| 7 "use strict"; | 7 "use strict"; |
| 8 | 8 |
| 9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // value => AsyncFunctionNext(value), | 34 // value => AsyncFunctionNext(value), |
| 35 // error => AsyncFunctionThrow(error) | 35 // error => AsyncFunctionThrow(error) |
| 36 // ); | 36 // ); |
| 37 var promise = PromiseCastResolved(value); | 37 var promise = PromiseCastResolved(value); |
| 38 | 38 |
| 39 var onFulfilled = | 39 var onFulfilled = |
| 40 (sentValue) => %_Call(AsyncFunctionNext, generator, sentValue); | 40 (sentValue) => %_Call(AsyncFunctionNext, generator, sentValue); |
| 41 var onRejected = | 41 var onRejected = |
| 42 (sentError) => %_Call(AsyncFunctionThrow, generator, sentError); | 42 (sentError) => %_Call(AsyncFunctionThrow, generator, sentError); |
| 43 | 43 |
| 44 var throwawayCapability = NewPromiseCapability(GlobalPromise); | 44 // false debugEvent to avoid redundant ExceptionEvents |
| 45 var throwawayCapability = NewPromiseCapability(GlobalPromise, false); |
| 45 return PerformPromiseThen(promise, onFulfilled, onRejected, | 46 return PerformPromiseThen(promise, onFulfilled, onRejected, |
| 46 throwawayCapability); | 47 throwawayCapability); |
| 47 } | 48 } |
| 48 | 49 |
| 49 %InstallToContext([ "async_function_await", AsyncFunctionAwait ]); | 50 %InstallToContext([ "async_function_await", AsyncFunctionAwait ]); |
| 50 | 51 |
| 51 }) | 52 }) |
| OLD | NEW |