fix: do not run dialog callback inside transaction commit (#31606)

This commit is contained in:
Cheng Zhao 2021-11-02 06:08:31 +09:00 committed by GitHub
parent 1e618ef06c
commit c4d35cd18c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 17 deletions

View file

@ -106,6 +106,12 @@ class Promise : public PromiseBase {
return resolved.GetHandle();
}
// Convert to another type.
template <typename NT>
Promise<NT> As() {
return Promise<NT>(isolate(), GetInner());
}
// Promise resolution is a microtask
// We use the MicrotasksRunner to trigger the running of pending microtasks
v8::Maybe<bool> Resolve(const RT& value) {