diff options
Diffstat (limited to 'js/src/builtin/Promise.js')
-rw-r--r-- | js/src/builtin/Promise.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/builtin/Promise.js b/js/src/builtin/Promise.js new file mode 100644 index 000000000..704cbab0b --- /dev/null +++ b/js/src/builtin/Promise.js @@ -0,0 +1,16 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// ES6, 25.4.4.6. +function Promise_static_get_species() { + // Step 1. + return this; +} +_SetCanonicalName(Promise_static_get_species, "get [Symbol.species]"); + +// ES6, 25.4.5.1. +function Promise_catch(onRejected) { + // Steps 1-2. + return callContentFunction(this.then, this, undefined, onRejected); +} |