Skip to content

Commit 35fd981

Browse files
joyeecheungkangwoosukeq
authored andcommitted
[ic] use CSA_DCHECK in CodeStubAssembler::SharedValueBarrier
Since the code is generated unconditionally, using a DCHECK to check that shared RO heap is enabled breaks builds with v8_enable_shared_ro_heap set to false, this patch turns that into a CSA_DCHECK so it only crashes when V8 actually attempts to store into a shared struct while the RO heap isn't shared at run time. Refs: nodejs/node#42115 Bug: v8:12547 Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598 Reviewed-by: Shu-yu Guo <[email protected]> Reviewed-by: Leszek Swirski <[email protected]> Commit-Queue: Joyee Cheung <[email protected]> Cr-Commit-Position: refs/heads/main@{#79756}
1 parent cb3715f commit 35fd981

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/codegen/code-stub-assembler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15960,7 +15960,7 @@ void CodeStubAssembler::SharedValueBarrier(
1596015960
GotoIf(TaggedIsSmi(value), &done);
1596115961
// Fast path: Shared memory features imply shared RO space, so RO objects are
1596215962
// trivially shared.
15963-
DCHECK(ReadOnlyHeap::IsReadOnlySpaceShared());
15963+
CSA_DCHECK(this, BoolConstant(ReadOnlyHeap::IsReadOnlySpaceShared()));
1596415964
TNode<IntPtrT> page_flags = LoadBasicMemoryChunkFlags(CAST(value));
1596515965
GotoIf(WordNotEqual(WordAnd(page_flags,
1596615966
IntPtrConstant(BasicMemoryChunk::READ_ONLY_HEAP)),

0 commit comments

Comments
 (0)