refactor: add promise helper and change whenReady to be native impl (#13115)
* Add promise helper and change whenReady to be native impl * remove commented code * add GetInner helper to dedupe promise code * add Promise.reject helper to be consistent with JS * fix linting * update promise impl per feedback * remove param name from unused isolate * Use non-depreceated resolvers for promises * Add thread dchecks for promise helper, intiialize promise pointer to nullptr
This commit is contained in:
parent
e9971173d4
commit
92588be2bd
8 changed files with 145 additions and 18 deletions
|
@ -1219,6 +1219,7 @@ void App::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("getName", base::Bind(&Browser::GetName, browser))
|
||||
.SetMethod("setName", base::Bind(&Browser::SetName, browser))
|
||||
.SetMethod("isReady", base::Bind(&Browser::is_ready, browser))
|
||||
.SetMethod("whenReady", base::Bind(&Browser::WhenReady, browser))
|
||||
.SetMethod("addRecentDocument",
|
||||
base::Bind(&Browser::AddRecentDocument, browser))
|
||||
.SetMethod("clearRecentDocuments",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue