06f5f84656
Because SizeFor only returns aligned values, when we check values returned there against kMaxSize, they can be larger if they were rounded up. It wasn't possible to write a test for the 2-byte version that didn't regularly OOM. Bug: chromium:752764 Change-Id: Id2f387449e0fafe633a2fde1ac728be31487f62d Reviewed-on: https://chromium-review.googlesource.com/607935 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#47252}
9 lines
296 B
JavaScript
9 lines
296 B
JavaScript
// Copyright 2017 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.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
a = "a".repeat(%StringMaxLength() - 3);
|
|
assertThrows(() => new RegExp("a" + a), SyntaxError);
|