Implemented using an internal promise instance instead of by extending Promise.