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, extrasUtils) { | 5 (function(global, utils, extrasUtils) { |
6 | 6 |
7 "use strict"; | 7 "use strict"; |
8 | 8 |
9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
10 | 10 |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 "all", PromiseAll, | 381 "all", PromiseAll, |
382 "race", PromiseRace, | 382 "race", PromiseRace, |
383 "resolve", PromiseResolve | 383 "resolve", PromiseResolve |
384 ]); | 384 ]); |
385 | 385 |
386 utils.InstallGetter(GlobalPromise, speciesSymbol, PromiseSpecies); | 386 utils.InstallGetter(GlobalPromise, speciesSymbol, PromiseSpecies); |
387 | 387 |
388 %SetCode(GlobalPromise.prototype.catch, PromiseCatch); | 388 %SetCode(GlobalPromise.prototype.catch, PromiseCatch); |
389 | 389 |
390 %InstallToContext([ | 390 %InstallToContext([ |
391 "promise_catch", PromiseCatch, | 391 "promise_catch", GlobalPromise.prototype.catch, |
392 "promise_create", PromiseCreate, | 392 "promise_create", PromiseCreate, |
393 "promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler, | 393 "promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler, |
394 "promise_reject", DoRejectPromise, | 394 "promise_reject", DoRejectPromise, |
395 // TODO(gsathya): Remove this once we update the promise builtin. | 395 // TODO(gsathya): Remove this once we update the promise builtin. |
396 "promise_internal_reject", RejectPromise, | 396 "promise_internal_reject", RejectPromise, |
397 "promise_handle", PromiseHandle, | 397 "promise_handle", PromiseHandle, |
398 "promise_debug_get_info", PromiseDebugGetInfo, | 398 "promise_debug_get_info", PromiseDebugGetInfo, |
399 "new_promise_capability", NewPromiseCapability, | 399 "new_promise_capability", NewPromiseCapability, |
400 "internal_promise_capability", CreateInternalPromiseCapability, | 400 "internal_promise_capability", CreateInternalPromiseCapability, |
401 "promise_id_resolve_handler", PromiseIdResolveHandler, | 401 "promise_id_resolve_handler", PromiseIdResolveHandler, |
(...skipping 11 matching lines...) Expand all Loading... |
413 | 413 |
414 utils.Export(function(to) { | 414 utils.Export(function(to) { |
415 to.PromiseCreate = PromiseCreate; | 415 to.PromiseCreate = PromiseCreate; |
416 to.PromiseThen = PromiseThen; | 416 to.PromiseThen = PromiseThen; |
417 | 417 |
418 to.CreateInternalPromiseCapability = CreateInternalPromiseCapability; | 418 to.CreateInternalPromiseCapability = CreateInternalPromiseCapability; |
419 to.RejectPromise = RejectPromise; | 419 to.RejectPromise = RejectPromise; |
420 }); | 420 }); |
421 | 421 |
422 }) | 422 }) |
OLD | NEW |