Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index 1295363d97f65fd6e14f7ca3fa86f9c79b61093e..5e8c460ddfcaedfc7582b846c90e0f54b7f53ac8 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -27,6 +27,7 @@ var promiseRawSymbol = utils.ImportNow("promise_raw_symbol"); |
var promiseStateSymbol = utils.ImportNow("promise_state_symbol"); |
var promiseResultSymbol = utils.ImportNow("promise_result_symbol"); |
var SpeciesConstructor; |
+var speciesSymbol = utils.ImportNow("species_symbol"); |
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); |
utils.Import(function(from) { |
@@ -563,6 +564,11 @@ function PromiseHasUserDefinedRejectHandler() { |
return PromiseHasUserDefinedRejectHandlerRecursive(this); |
}; |
+ |
+function PromiseSpecies() { |
+ return this; |
+} |
+ |
// ------------------------------------------------------------------- |
// Install exported functions. |
@@ -577,6 +583,8 @@ utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ |
"resolve", PromiseResolve |
]); |
+utils.InstallGetter(GlobalPromise, speciesSymbol, PromiseSpecies); |
+ |
utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [ |
"then", PromiseThen, |
"catch", PromiseCatch |