瀏覽代碼

Ladybird: Don't overwrite argv[0] in spawn_helper_process()

This is already set correctly at the caller.
MacDue 2 年之前
父節點
當前提交
1c92e6ee9d
共有 2 個文件被更改,包括 1 次插入2 次删除
  1. 0 1
      Ladybird/HelperProcess.cpp
  2. 1 1
      Ladybird/WebContentView.cpp

+ 0 - 1
Ladybird/HelperProcess.cpp

@@ -15,7 +15,6 @@ ErrorOr<void> spawn_helper_process(StringView process_name, Span<StringView> arg
     VERIFY(!paths.is_empty());
     ErrorOr<void> result;
     for (auto const& path : paths) {
-        arguments[0] = path.bytes_as_string_view();
         result = Core::System::exec(path, arguments, search_in_path, environment);
         if (!result.is_error())
             break;

+ 1 - 1
Ladybird/WebContentView.cpp

@@ -581,7 +581,7 @@ void WebContentView::create_client()
 
         auto webcontent_fd_passing_socket_string = DeprecatedString::number(wc_fd_passing_fd);
 
-        Vector<StringView> arguments {
+        Vector<StringView, 5> arguments {
             "WebContent"sv,
             "--webcontent-fd-passing-socket"sv,
             webcontent_fd_passing_socket_string