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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 "all", PromiseAll, | 356 "all", PromiseAll, |
357 "race", PromiseRace, | 357 "race", PromiseRace, |
358 "resolve", PromiseResolve | 358 "resolve", PromiseResolve |
359 ]); | 359 ]); |
360 | 360 |
361 utils.InstallGetter(GlobalPromise, speciesSymbol, PromiseSpecies); | 361 utils.InstallGetter(GlobalPromise, speciesSymbol, PromiseSpecies); |
362 | 362 |
363 %SetCode(GlobalPromise.prototype.catch, PromiseCatch); | 363 %SetCode(GlobalPromise.prototype.catch, PromiseCatch); |
364 | 364 |
365 %InstallToContext([ | 365 %InstallToContext([ |
366 "promise_catch", PromiseCatch, | 366 "promise_catch", GlobalPromise.prototype.catch, |
367 "promise_create", PromiseCreate, | 367 "promise_create", PromiseCreate, |
368 "promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler, | 368 "promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler, |
369 "promise_reject", DoRejectPromise, | 369 "promise_reject", DoRejectPromise, |
370 // TODO(gsathya): Remove this once we update the promise builtin. | 370 // TODO(gsathya): Remove this once we update the promise builtin. |
371 "promise_internal_reject", RejectPromise, | 371 "promise_internal_reject", RejectPromise, |
372 "promise_debug_get_info", PromiseDebugGetInfo, | 372 "promise_debug_get_info", PromiseDebugGetInfo, |
373 "new_promise_capability", NewPromiseCapability, | 373 "new_promise_capability", NewPromiseCapability, |
374 "internal_promise_capability", CreateInternalPromiseCapability, | 374 "internal_promise_capability", CreateInternalPromiseCapability, |
375 "promise_id_resolve_handler", PromiseIdResolveHandler, | 375 "promise_id_resolve_handler", PromiseIdResolveHandler, |
376 "promise_id_reject_handler", PromiseIdRejectHandler | 376 "promise_id_reject_handler", PromiseIdRejectHandler |
(...skipping 10 matching lines...) Expand all Loading... |
387 | 387 |
388 utils.Export(function(to) { | 388 utils.Export(function(to) { |
389 to.PromiseCreate = PromiseCreate; | 389 to.PromiseCreate = PromiseCreate; |
390 to.PromiseThen = PromiseThen; | 390 to.PromiseThen = PromiseThen; |
391 | 391 |
392 to.CreateInternalPromiseCapability = CreateInternalPromiseCapability; | 392 to.CreateInternalPromiseCapability = CreateInternalPromiseCapability; |
393 to.RejectPromise = RejectPromise; | 393 to.RejectPromise = RejectPromise; |
394 }); | 394 }); |
395 | 395 |
396 }) | 396 }) |
OLD | NEW |