use of com.github.anba.es6draft.runtime.objects.promise.PromiseConstructor in project es6draft by anba.
the class Realm method initializePromiseObjects.
/**
* <h1>25 Control Abstraction Objects</h1><br>
* <h2>25.4 Promise Objects</h2>
*
* @param realm
* the realm instance
*/
private static void initializePromiseObjects(Realm realm) {
EnumMap<Intrinsics, OrdinaryObject> intrinsics = realm.intrinsics;
// allocation phase
PromiseConstructor promiseConstructor = new PromiseConstructor(realm);
PromisePrototype promisePrototype = new PromisePrototype(realm);
// registration phase
intrinsics.put(Intrinsics.Promise, promiseConstructor);
intrinsics.put(Intrinsics.PromisePrototype, promisePrototype);
// initialization phase
promiseConstructor.initialize(realm);
promisePrototype.initialize(realm);
}
Aggregations