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

Side by Side Diff: src/js/prologue.js

Issue 2630593004: [promises] Remove runtime call from fastpath in PromiseReject (Closed)
Patch Set: remove helper Created 3 years, 11 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 | « src/js/async-await.js ('k') | 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 utils.OverrideFunction = OverrideFunction; 259 utils.OverrideFunction = OverrideFunction;
260 utils.SetUpLockedPrototype = SetUpLockedPrototype; 260 utils.SetUpLockedPrototype = SetUpLockedPrototype;
261 utils.PostNatives = PostNatives; 261 utils.PostNatives = PostNatives;
262 utils.PostExperimentals = PostExperimentals; 262 utils.PostExperimentals = PostExperimentals;
263 utils.PostDebug = PostDebug; 263 utils.PostDebug = PostDebug;
264 264
265 %ToFastProperties(utils); 265 %ToFastProperties(utils);
266 266
267 // ----------------------------------------------------------------------- 267 // -----------------------------------------------------------------------
268 268
269 %OptimizeObjectForAddingMultipleProperties(extrasUtils, 5); 269 %OptimizeObjectForAddingMultipleProperties(extrasUtils, 7);
270 270
271 extrasUtils.logStackTrace = function logStackTrace() { 271 extrasUtils.logStackTrace = function logStackTrace() {
272 %DebugTrace(); 272 %DebugTrace();
273 }; 273 };
274 274
275 extrasUtils.log = function log() { 275 extrasUtils.log = function log() {
276 let message = ''; 276 let message = '';
277 for (const arg of arguments) { 277 for (const arg of arguments) {
278 message += arg; 278 message += arg;
279 } 279 }
(...skipping 20 matching lines...) Expand all
300 return %reflect_apply(func, thisArg, args); 300 return %reflect_apply(func, thisArg, args);
301 }; 301 };
302 }; 302 };
303 303
304 extrasUtils.uncurryThis = function uncurryThis(func) { 304 extrasUtils.uncurryThis = function uncurryThis(func) {
305 return function(thisArg, ...args) { 305 return function(thisArg, ...args) {
306 return %reflect_apply(func, thisArg, args); 306 return %reflect_apply(func, thisArg, args);
307 }; 307 };
308 }; 308 };
309 309
310 // We pass true to trigger the debugger's on exception handler.
311 extrasUtils.rejectPromise = function rejectPromise(promise, reason) {
312 %promise_internal_reject(promise, reason, true);
313 }
314
315 extrasUtils.markPromiseAsHandled = function markPromiseAsHandled(promise) {
316 %PromiseMarkAsHandled(promise);
317 };
318
310 %ToFastProperties(extrasUtils); 319 %ToFastProperties(extrasUtils);
311 320
312 }) 321 })
OLDNEW
« no previous file with comments | « src/js/async-await.js ('k') | src/js/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698