commit | 0948be58da992837b81003dad844dd20e6eceddd | [log] [tgz] |
---|---|---|
author | Mark Mentovai <mark@chromium.org> | Wed Nov 04 23:01:52 2020 |
committer | Srinivas Sista <srinivassista@chromium.org> | Wed Nov 04 23:01:52 2020 |
tree | 0d67d00e871f235b9df796e956a6f8fe34082d1e | |
parent | d2abe4588adaeb0d66aa0a0106675be1dff12c64 [diff] |
mac-arm64: Run x86_64 Widevine, if available, under Rosetta On mac-arm64, allow the x86_64 Widevine content decryption module (CDM) to run under Rosetta translation, even when running native arm64 Chrome. This is necessary because there isn’t currently an arm64-native Widevine CDM. It’s not necessary to run the rest of Chrome as x86_64 under Rosetta translation. The isolated Widevine CDM runs in its own x86_64 utility process, and is IPC-compatible with the rest of Chrome. This alleviates any performance impact on the rest of Chrome, and allows crash reporting to work correctly for the rest of Chrome. An ordinary build of Chrome for mac-arm64, even an official build, will not include a bundled x86_64 Widevine CDM library (or, obviously, an arm64 one, as it does not yet exist). The x86_64 Widevine library is useless to an arm64 Chrome without an x86_64 process to host it. However, if a universal build of Chrome is created by merging same-version x86_64 and arm64 builds, the arm64 code will look for an x86_64 Widevine CDM and, if found, launch an x86_64 helper process under Rosetta translation to host it. https://chromium-review.googlesource.com/c/2515521/ is a proposal for creating such a universal build. Implementation notes: if no Widevine CDM library is found in the arm64 platform-specific location, Chrome on mac-arm64 will look for one in the x86_64 platform-specific location. This allows mac-arm64 Chrome to find the x86_64-only bundled Widevine library. Separately, any Widevine library found will be examined to determine its architecture. If it contains x86_64 code and no arm64 code, an x86_64 helper will be launched to host it. This is done because, although the Widevine library bundled in Chrome is known to be x86_64-only and will only exist in the x86_64 platform-specific location, it is expected that a future update distributed by the component updater will support arm64 natively. However, in the event that a component update is produced that supports x86_64 but not yet arm64, it is likely that the x86_64 version distributed to arm64 users as a component update will appear in the arm64 platform-specific location, despite being x86_64 code. This means that the platform-specific location path cannot be trusted to convey the actual architecture of the library contained therein, and the architecture must be determined by examining the library to be loaded. No behavior change for non-mac-arm64 builds. (cherry picked from commit dcfbb59cc22614ae318618824fccc5d446adcb12) Bug: 1142017 Code-Word: calamity CQ-Include-Trybots: luci.chromium.try:mac-arm64-rel Change-Id: Ib3f4a654f89f41c0fbf9239f99010387ea242763 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2493191 Commit-Queue: Mark Mentovai <mark@chromium.org> Commit-Queue: Robert Sesek <rsesek@chromium.org> Auto-Submit: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Joshua Pawlicki <waffles@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Xiaohan Wang <xhwang@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#823801} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519881 Reviewed-by: Srinivas Sista <srinivassista@chromium.org> Cr-Commit-Position: refs/branch-heads/4315@{#12} Cr-Branched-From: 7ba203c1d123a84d65e7d350a46b0108f7369b20-refs/heads/master@{#823725}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.