load_v8_snapshot_in_browser_process.patch 1.3 KB

12345678910111213141516171819202122232425262728
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: John Kleinschmidt <[email protected]>
  3. Date: Mon, 11 Oct 2021 14:08:06 -0400
  4. Subject: load v8 snapshot in browser process
  5. https://chromium-review.googlesource.com/c/chromium/src/+/3183394
  6. made a change to not load the v8 snapshot in the browser process,
  7. but due to the nature of electron, we need to load the v8 snapshot
  8. in the browser process.
  9. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
  10. index bd44d9c63b506f8e2c126f2bc0054b1d018b9b39..08fa1ff278c0b6b2f804d79234898b90f3d29b29 100644
  11. --- a/content/app/content_main_runner_impl.cc
  12. +++ b/content/app/content_main_runner_impl.cc
  13. @@ -292,11 +292,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
  14. bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
  15. const std::string& process_type) {
  16. - // The gpu does not need v8, and the browser only needs v8 when in single
  17. - // process mode.
  18. - if (process_type == switches::kGpuProcess ||
  19. - (process_type.empty() &&
  20. - !command_line.HasSwitch(switches::kSingleProcess))) {
  21. + // The gpu does not need v8
  22. + if (process_type == switches::kGpuProcess) {
  23. return false;
  24. }
  25. return true;