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 c3a90e835d216768c07242d42a2b6f3875f06b83..1a75f6e8d733c049a3ef4978e3fb529dc31c944e 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;