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

Side by Side Diff: src/promise.js

Issue 1306993003: Call JS functions via native context instead of js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 3 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/prologue.js ('k') | src/proxy.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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) { 5 (function(global, utils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 "race", PromiseRace, 372 "race", PromiseRace,
373 "resolve", PromiseCast 373 "resolve", PromiseCast
374 ]); 374 ]);
375 375
376 utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [ 376 utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [
377 "chain", PromiseChain, 377 "chain", PromiseChain,
378 "then", PromiseThen, 378 "then", PromiseThen,
379 "catch", PromiseCatch 379 "catch", PromiseCatch
380 ]); 380 ]);
381 381
382 utils.ExportToRuntime(function(to) { 382 %InstallToContext([
383 to["promise_catch"] = PromiseCatch; 383 "promise_catch", PromiseCatch,
384 to["promise_chain"] = PromiseChain; 384 "promise_chain", PromiseChain,
385 to["promise_create"] = PromiseCreate; 385 "promise_create", PromiseCreate,
386 to["promise_has_user_defined_reject_handler"] = 386 "promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler,
387 PromiseHasUserDefinedRejectHandler; 387 "promise_reject", PromiseReject,
388 to["promise_reject"] = PromiseReject; 388 "promise_resolve", PromiseResolve,
389 to["promise_resolve"] = PromiseResolve; 389 "promise_then", PromiseThen,
390 to["promise_then"] = PromiseThen; 390 ]);
391 });
392 391
393 }) 392 })
OLDNEW
« no previous file with comments | « src/prologue.js ('k') | src/proxy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698