mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: migrates util::Promise to gin (#20871)
* refactor: use gin in Promise * refactor: separate Promise impl that returns nothing * refactor: use Promise<void> for promise that returns nothing * fix: methods should be able to run on both browser and renderer process * fix: should not pass base::StringPiece across threads * refactor: no more need to use different ResolvePromise for empty Promise * refactor: move Promise to gin_helper
This commit is contained in:
@@ -168,7 +168,7 @@ void Browser::DidFinishLaunching(base::DictionaryValue launch_info) {
|
||||
|
||||
v8::Local<v8::Value> Browser::WhenReady(v8::Isolate* isolate) {
|
||||
if (!ready_promise_) {
|
||||
ready_promise_ = std::make_unique<util::Promise<void*>>(isolate);
|
||||
ready_promise_ = std::make_unique<gin_helper::Promise<void>>(isolate);
|
||||
if (is_ready()) {
|
||||
ready_promise_->Resolve();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user