fad99f5e21
This was already the case for 1-byte strings. This prevents crashes when attempting to externalize such strings. Bug: chromium:842078, v8:7464 Change-Id: I3092a6748edaf77b2689f7b6f6b949929998e508 Reviewed-on: https://chromium-review.googlesource.com/1054290 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#53124}
15 lines
446 B
JavaScript
15 lines
446 B
JavaScript
// Copyright 2018 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: --expose-externalize-string
|
|
|
|
// Attempt to externalize a string that's in RO_SPACE, which is not allowed as
|
|
// the string's map would need to be writable.
|
|
assertThrows(() => {
|
|
externalizeString("1", false)
|
|
});
|
|
assertThrows(() => {
|
|
externalizeString("1", true)
|
|
});
|