let promise2 = new Promise((resolve, reject) => { if (this.status === RESOLVED) { setTimeout(() => { try { let x = onFulfilled(this.value); resolvePromise(promise2, x, resolve, reject); } catch (e) { reject(e); } }, 0); }
注意要拿到promise2得用异步方法,然后异步方法捕获不到错误