Add support for native creation and resolution of Promises (fixes issue #3305)

This commit is contained in:
VodBox
2022-10-11 14:54:32 -04:00
committed by Marshall Greenblatt
parent 60ee4a34aa
commit fa643b269e
10 changed files with 609 additions and 9 deletions

View File

@ -237,6 +237,7 @@ class CefV8ValueImpl : public CefV8Value {
bool IsArray() override;
bool IsArrayBuffer() override;
bool IsFunction() override;
bool IsPromise() override;
bool IsSame(CefRefPtr<CefV8Value> value) override;
bool GetBoolValue() override;
int32 GetIntValue() override;
@ -282,6 +283,9 @@ class CefV8ValueImpl : public CefV8Value {
CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments) override;
bool ResolvePromise(CefRefPtr<CefV8Value> arg) override;
bool RejectPromise(const CefString& errorMsg) override;
private:
// Test for and record any exception.
bool HasCaught(v8::Local<v8::Context> context, v8::TryCatch& try_catch);