mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 17:35:08 +00:00
LibWebView: Unbreak spawning WebContent process with valgrind
We now check if the WebContent is executable before passing it to the valgrind wrapper. We can't rely on exec() to fail here, since it will always succeed even when passing a bad WebContent path to valgrind.
This commit is contained in:
parent
5f39a3f911
commit
df1748e1d1
1 changed files with 4 additions and 0 deletions
|
@ -200,6 +200,10 @@ ErrorOr<NonnullRefPtr<WebView::WebContentClient>> ViewImplementation::launch_web
|
|||
ErrorOr<void> result;
|
||||
for (auto const& path : candidate_web_content_paths) {
|
||||
constexpr auto callgrind_prefix_length = 3;
|
||||
|
||||
if (Core::System::access(path, X_OK).is_error())
|
||||
continue;
|
||||
|
||||
auto arguments = Vector {
|
||||
"valgrind"sv,
|
||||
"--tool=callgrind"sv,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue