Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Issue 944913002: Transfer v8 snapshot files as file descriptors to child processes on Posix (Closed)

Created:
5 years, 10 months ago by rmcilroy
Modified:
5 years, 10 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Transfer v8 snapshot files as file descriptors to child processes on Posix. An update on Chrome could replace the V8 snapshot files with newer version. For zygoted processes this is OK because the zygote will have already mapped the V8 snapshot and thus child processes will use the correct version of the snapshot. However, for processes which don't use the zygote (such as unsandboxed plugin processes) base::LaunchProcess will launch the old version of he Chrome binary (via /proc/self/exe on Linux), but the child will read the new version of the V8 snapshot, thus causing a crash due to a version mismatch. The fix is to load V8 snapshot file in the browser and pass a file descriptor to the child processes (much like Android already did, but for different reasons). This ensures that the child process always sees the correct version of the snapshot file. BUG=457656, 461057 Committed: https://crrev.com/3fb072718b5ff38aa9c34d8d5160404aa2ad50a5 Cr-Commit-Position: refs/heads/master@{#317790}

Patch Set 1 #

Patch Set 2 : Add file mapping to content/shell #

Patch Set 3 : Tidy up #

Total comments: 1

Patch Set 4 : Fix android content_browsertests and android webview #

Patch Set 5 : Only get region when descriptor is set. #

Patch Set 6 : Fix iOS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -67 lines) Patch
M build/android/pylib/utils/isolator.py View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 chunks +26 lines, -21 lines 0 comments Download
M content/app/content_main_runner.cc View 1 2 3 4 5 6 chunks +31 lines, -26 lines 0 comments Download
M content/public/common/content_descriptors.h View 1 chunk +4 lines, -5 lines 0 comments Download
M content/shell/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/browser/shell_content_browser_client.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/shell/browser/shell_content_browser_client.cc View 1 2 3 chunks +29 lines, -1 line 0 comments Download
M gin/isolate_holder.cc View 1 2 3 chunks +12 lines, -13 lines 0 comments Download
M gin/public/isolate_holder.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
rmcilroy
Jochen: could you take a look please? Thanks.
5 years, 10 months ago (2015-02-20 22:50:41 UTC) #2
rmcilroy
https://codereview.chromium.org/944913002/diff/40001/content/shell/browser/shell_content_browser_client.cc File content/shell/browser/shell_content_browser_client.cc (right): https://codereview.chromium.org/944913002/diff/40001/content/shell/browser/shell_content_browser_client.cc#newcode345 content/shell/browser/shell_content_browser_client.cc:345: mappings->Share(kV8SnapshotDataDescriptor, v8_snapshot_fd_.get()); I'm not keen on the duplication with ...
5 years, 10 months ago (2015-02-20 22:53:25 UTC) #3
jochen (gone - plz use gerrit)
why is this not possible on mac as well?
5 years, 10 months ago (2015-02-23 12:12:27 UTC) #4
rmcilroy
On 2015/02/23 12:12:27, jochen (slow) wrote: > why is this not possible on mac as ...
5 years, 10 months ago (2015-02-23 12:27:52 UTC) #5
jochen (gone - plz use gerrit)
ok, could you file a bug that mac/win should switch to this model as well? ...
5 years, 10 months ago (2015-02-23 12:32:36 UTC) #6
rmcilroy
On 2015/02/23 12:32:36, jochen (slow) wrote: > ok, could you file a bug that mac/win ...
5 years, 10 months ago (2015-02-23 22:10:10 UTC) #7
jochen (gone - plz use gerrit)
lgtm
5 years, 10 months ago (2015-02-24 09:33:37 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/944913002/80001
5 years, 10 months ago (2015-02-24 09:41:28 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja_ng/builds/13791)
5 years, 10 months ago (2015-02-24 10:02:20 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/944913002/100001
5 years, 10 months ago (2015-02-24 12:02:50 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 10 months ago (2015-02-24 13:33:12 UTC) #16
commit-bot: I haz the power
5 years, 10 months ago (2015-02-24 13:33:59 UTC) #17
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3fb072718b5ff38aa9c34d8d5160404aa2ad50a5
Cr-Commit-Position: refs/heads/master@{#317790}

Powered by Google App Engine
This is Rietveld 408576698