chore: clean up promise resoution with helpers (#17268)
This commit is contained in:
parent
3e5a98b5f4
commit
d9234798d3
6 changed files with 26 additions and 52 deletions
|
@ -1300,11 +1300,12 @@ v8::Local<v8::Promise> WebContents::SavePage(
|
|||
const base::FilePath& full_file_path,
|
||||
const content::SavePageType& save_type) {
|
||||
util::Promise promise(isolate());
|
||||
v8::Local<v8::Promise> ret = promise.GetHandle();
|
||||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
auto* handler = new SavePageHandler(web_contents(), std::move(promise));
|
||||
handler->Handle(full_file_path, save_type);
|
||||
return ret;
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
void WebContents::OpenDevTools(mate::Arguments* args) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue