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
|
@ -65,7 +65,8 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host,
|
|||
if (it == pending_requests_.end())
|
||||
return;
|
||||
|
||||
electron::util::Promise promise = std::move(it->second);
|
||||
electron::util::Promise<base::DictionaryValue> promise =
|
||||
std::move(it->second);
|
||||
pending_requests_.erase(it);
|
||||
|
||||
base::DictionaryValue* error = nullptr;
|
||||
|
@ -129,7 +130,7 @@ void Debugger::Detach() {
|
|||
}
|
||||
|
||||
v8::Local<v8::Promise> Debugger::SendCommand(mate::Arguments* args) {
|
||||
electron::util::Promise promise(isolate());
|
||||
electron::util::Promise<base::DictionaryValue> promise(isolate());
|
||||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
if (!agent_host_) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue