fix: crash when showin item in folder on DevTools (#33024)
This commit is contained in:
parent
b96f15bfc2
commit
076bc58b2a
1 changed files with 6 additions and 3 deletions
|
@ -175,6 +175,10 @@ GURL GetDevToolsURL(bool can_dock) {
|
||||||
return GURL(url_string);
|
return GURL(url_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnOpenItemComplete(const base::FilePath& path, const std::string& result) {
|
||||||
|
platform_util::ShowItemInFolder(path);
|
||||||
|
}
|
||||||
|
|
||||||
constexpr base::TimeDelta kInitialBackoffDelay = base::Milliseconds(250);
|
constexpr base::TimeDelta kInitialBackoffDelay = base::Milliseconds(250);
|
||||||
constexpr base::TimeDelta kMaxBackoffDelay = base::Seconds(10);
|
constexpr base::TimeDelta kMaxBackoffDelay = base::Seconds(10);
|
||||||
|
|
||||||
|
@ -737,9 +741,8 @@ void InspectableWebContents::ShowItemInFolder(
|
||||||
return;
|
return;
|
||||||
|
|
||||||
base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path);
|
base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path);
|
||||||
|
platform_util::OpenPath(path.DirName(),
|
||||||
// Pass empty callback here; we can ignore errors
|
base::BindOnce(&OnOpenItemComplete, path));
|
||||||
platform_util::OpenPath(path, platform_util::OpenCallback());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InspectableWebContents::SaveToFile(const std::string& url,
|
void InspectableWebContents::SaveToFile(const std::string& url,
|
||||||
|
|
Loading…
Reference in a new issue