Commit 2f434c47 authored by Marja Hölttä's avatar Marja Hölttä Committed by V8 LUCI CQ

[web snap] Bypass errors when encountering sealed / frozen arrays

Integrity levels are not handled yet (but there's a TODO now).

Bug: v8:11525, v8:12820
Change-Id: Id72e49b363615e51ec89a353101cc4cf76ccbab4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616515Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80300}
parent 1267e518
......@@ -866,11 +866,15 @@ void WebSnapshotSerializer::DiscoverArray(Handle<JSArray> array) {
auto elements_kind = array->GetElementsKind();
if (elements_kind != PACKED_SMI_ELEMENTS &&
elements_kind != PACKED_ELEMENTS) {
elements_kind != PACKED_ELEMENTS &&
elements_kind != PACKED_SEALED_ELEMENTS &&
elements_kind != PACKED_FROZEN_ELEMENTS) {
Throw("Unsupported array");
return;
}
// TODO(v8:11525): Support sparse arrays & arrays with holes.
// TODO(v8:11525): Handle sealed & frozen elements correctly. (Also: handle
// sealed & frozen objects.)
DisallowGarbageCollection no_gc;
FixedArray elements = FixedArray::cast(array->elements());
for (int i = 0; i < elements.length(); ++i) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment