| OLD | NEW |
| 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 Loading... |
| 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 }) |
| OLD | NEW |