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:
Samuel Attard 2018-06-28 07:06:08 +10:00 committed by Charles Kerr
parent e9971173d4
commit 92588be2bd
8 changed files with 145 additions and 18 deletions

View file

@ -15,6 +15,7 @@
#include "atom/browser/browser.h"
#include "atom/browser/browser_observer.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/promise_util.h"
#include "base/process/process_iterator.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/icon_manager.h"