commit | 731871eeabb6a9c78669292a44e927c5f42b1f7d | [log] [tgz] |
---|---|---|
author | Hiroshige Hayashizaki <hiroshige@chromium.org> | Thu Dec 02 19:23:45 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Dec 02 19:23:45 2021 |
tree | 9b3b8acd60fd4bec4fd619cd4d105e3b151a44a7 | |
parent | 67d4e10ebb7f4306f3e2831623f882857ec163f9 [diff] |
Store SHA-256 hash of wire bytes for WASM V8 Code Cache This CL stores and validates SHA-256 hash of wire bytes in WASM V8 Code Cache to prevent mismatches between wire bytes and code cache metadata. When hitting code cache, this CL calculates the hash while streaming wire bytes, and invalidates the code cache metadata on hash mismatch, by setting `can_use_compiled_module` to `false` in `WasmStreaming::Finish()`. The cached metadata is passed to V8 by `SetCompiledModuleBytes()` when the first bytes of the wire bytes are received, but this only triggers suppressiong of streaming compilation and the content of the cached metadata is not used until `WasmStreaming::Finish(true)` is called later. This CL also adds tracing events to measure hashing overhead and observe cache rejection by hash mismatch. This CL depends on V8 side CL: https://chromium-review.googlesource.com/c/v8/v8/+/3297548 (cherry picked from commit 7077e03a4e02c198ac9fdb0814d195df7a75c229) Bug: 1260939 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3282643 Cr-Original-Commit-Position: refs/heads/main@{#944867} No-Try: true Change-Id: If074cbeeb7015a359566821cae544ff8f1cd3589 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3310065 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/branch-heads/4664@{#1207} Cr-Branched-From: 24dc4ee75e01a29d390d43c9c264372a169273a7-refs/heads/main@{#929512}
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.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
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.
If you found a bug, please file it at https://crbug.com/new.