refactor: make util::Promise type safe when chaining in native (#19809)
* refactor: make util::Promise type safe when chaining in native * fixup! refactor: make util::Promise type safe when chaining in native * chore: remove spare brackets
This commit is contained in:
parent
f7e3e1f97a
commit
6a3922d330
39 changed files with 275 additions and 343 deletions
|
@ -75,12 +75,12 @@ class IPCRenderer : public mate::Wrappable<IPCRenderer> {
|
|||
v8::Local<v8::Promise> Invoke(mate::Arguments* args,
|
||||
const std::string& channel,
|
||||
const base::Value& arguments) {
|
||||
electron::util::Promise p(args->isolate());
|
||||
electron::util::Promise<base::Value> p(args->isolate());
|
||||
auto handle = p.GetHandle();
|
||||
|
||||
electron_browser_ptr_->get()->Invoke(
|
||||
channel, arguments.Clone(),
|
||||
base::BindOnce([](electron::util::Promise p,
|
||||
base::BindOnce([](electron::util::Promise<base::Value> p,
|
||||
base::Value result) { p.Resolve(result); },
|
||||
std::move(p)));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue