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 var $promiseCreate; | |
6 var $promiseResolve; | |
7 var $promiseReject; | |
8 var $promiseChain; | |
9 var $promiseCatch; | |
10 var $promiseThen; | |
11 var $promiseHasUserDefinedRejectHandler; | 5 var $promiseHasUserDefinedRejectHandler; |
12 var $promiseStatus; | 6 var $promiseStatus; |
13 var $promiseValue; | 7 var $promiseValue; |
14 | 8 |
15 (function(global, utils) { | 9 (function(global, utils) { |
16 | 10 |
17 "use strict"; | 11 "use strict"; |
18 | 12 |
19 %CheckIsBootstrapping(); | 13 %CheckIsBootstrapping(); |
20 | 14 |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 "race", PromiseRace, | 373 "race", PromiseRace, |
380 "resolve", PromiseCast | 374 "resolve", PromiseCast |
381 ]); | 375 ]); |
382 | 376 |
383 utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [ | 377 utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [ |
384 "chain", PromiseChain, | 378 "chain", PromiseChain, |
385 "then", PromiseThen, | 379 "then", PromiseThen, |
386 "catch", PromiseCatch | 380 "catch", PromiseCatch |
387 ]); | 381 ]); |
388 | 382 |
389 $promiseCreate = PromiseCreate; | |
390 $promiseResolve = PromiseResolve; | |
391 $promiseReject = PromiseReject; | |
392 $promiseChain = PromiseChain; | |
393 $promiseCatch = PromiseCatch; | |
394 $promiseThen = PromiseThen; | |
395 $promiseHasUserDefinedRejectHandler = PromiseHasUserDefinedRejectHandler; | 383 $promiseHasUserDefinedRejectHandler = PromiseHasUserDefinedRejectHandler; |
396 $promiseStatus = promiseStatus; | 384 $promiseStatus = promiseStatus; |
397 $promiseValue = promiseValue; | 385 $promiseValue = promiseValue; |
398 | 386 |
| 387 utils.ExportToRuntime(function(to) { |
| 388 to.promiseStatus = promiseStatus; |
| 389 to.promiseValue = promiseValue; |
| 390 to.PromiseCreate = PromiseCreate; |
| 391 to.PromiseResolve = PromiseResolve; |
| 392 to.PromiseReject = PromiseReject; |
| 393 to.PromiseChain = PromiseChain; |
| 394 to.PromiseCatch = PromiseCatch; |
| 395 to.PromiseThen = PromiseThen; |
| 396 }); |
| 397 |
399 }) | 398 }) |
OLD | NEW |