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

Side by Side Diff: src/js/harmony-async-await.js

Issue 2244003003: Change which ExceptionEvents are triggered by Promises (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed typos Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/js/promise.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 })
OLDNEW
« no previous file with comments | « no previous file | src/js/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698