mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: replace ipcRendererUtils.invoke() with ipcRendererInternal.invoke() (#19574)
This commit is contained in:
committed by
Jeremy Apthorp
parent
698120daf0
commit
81e9dab52f
@@ -73,13 +73,14 @@ class IPCRenderer : public mate::Wrappable<IPCRenderer> {
|
||||
}
|
||||
|
||||
v8::Local<v8::Promise> Invoke(mate::Arguments* args,
|
||||
bool internal,
|
||||
const std::string& channel,
|
||||
const base::Value& arguments) {
|
||||
electron::util::Promise<base::Value> p(args->isolate());
|
||||
auto handle = p.GetHandle();
|
||||
|
||||
electron_browser_ptr_->get()->Invoke(
|
||||
channel, arguments.Clone(),
|
||||
internal, channel, arguments.Clone(),
|
||||
base::BindOnce([](electron::util::Promise<base::Value> p,
|
||||
base::Value result) { p.Resolve(result); },
|
||||
std::move(p)));
|
||||
|
||||
Reference in New Issue
Block a user