cf3f222543
Invariant in the normal mode: - If the data is invalid, we'll fail gracefully (no crash, no DCHECK failures) Invariant in the hard fail mode: - If the data is invalid (in a way we can detect), a CHECK fails at the earliest location where we detect the inconsistency Bug: chromium:1381404 Change-Id: Icae077a5c76329018fdb759122297134ae70b897 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4013142 Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/main@{#84265}
10 lines
342 B
JavaScript
10 lines
342 B
JavaScript
// Copyright 2022 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
const a = {"maxByteLength": 15061061};
|
|
const e = d8.serializer.serialize(a);
|
|
const f = new Uint8Array(e);
|
|
f[18] = 114;
|
|
assertThrows(() => { d8.serializer.deserialize(e); });
|