8c84ac3339
This is a reland of commit bb288ea342
Changes since revert:
- Skip added test in single generation builds (shared heap is not supported in single generation).
- Use Isolate::Current() instead of GetIsolateFromWritableObject() for strings that reside in shared space (not only if the string is actually shared).
Original change's description:
> [strings] Don't try to record/update invalidated slots in shared space
>
> Strings in shared space are always direct (i.e. they don't contain
> pointers) and therefore cannot have any recorded slots.
>
> Drive-by: DCHECK no slots are recorded in shared space.
>
> Bug: chromium:1394741
> Change-Id: If1ef04d2fadcc14f552f69e99dc109d883e975c9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075908
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84630}
Bug: chromium:1394741
Change-Id: I6889b565f8a247ae1fe553158e29984e7c05563a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079224
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84652}
24 lines
626 B
JavaScript
24 lines
626 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.
|
|
//
|
|
// Flags: --expose-gc --expose-externalize-string --shared-string-table
|
|
|
|
(function __f_0() {
|
|
let worker = new Worker('', {type: 'string'});
|
|
})();
|
|
function __f_11() { return "A"; }
|
|
function __f_12() { return "\u1234"; }
|
|
function __f_13() {
|
|
var __v_3 = "";
|
|
var __v_5 =
|
|
"AAAA" + __f_11();
|
|
var __v_6 =
|
|
"\u1234\u1234\u1234\u1234" + __f_12();
|
|
gc();
|
|
externalizeString(__v_6);
|
|
}
|
|
for (var __v_4 = 0; __v_4 < 10; __v_4++) {
|
|
__f_13();
|
|
}
|