fix: savePage throw on relative paths (#32728)
This commit is contained in:
parent
d46431b564
commit
81fcd732c2
3 changed files with 23 additions and 1 deletions
|
@ -2353,6 +2353,11 @@ v8::Local<v8::Promise> WebContents::SavePage(
|
|||
gin_helper::Promise<void> promise(isolate);
|
||||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
if (!full_file_path.IsAbsolute()) {
|
||||
promise.RejectWithErrorMessage("Path must be absolute");
|
||||
return handle;
|
||||
}
|
||||
|
||||
auto* handler = new SavePageHandler(web_contents(), std::move(promise));
|
||||
handler->Handle(full_file_path, save_type);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue