Skip to content

Commit c9160c9

Browse files
authored
deps: Fix v8 build in debug mode (#43956)
We're getting ``` external/v8/src/objects/objects-inl.h:1623:27: error: no member named 'IsRequired' in 'v8::internal::WriteBarrier' 1623 | DCHECK(!WriteBarrier::IsRequired(*this, value)); | ~~~~~~~~~~~~~~^ ``` Signed-off-by: Jonh Wendell <jwendell@redhat.com>
1 parent 5957c40 commit c9160c9

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

bazel/v8.patch

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,37 @@ index 78e62abb..d7edf951 100644
158158
} // extern "C"
159159
+
160160
+#endif
161+
diff --git a/src/objects/objects-inl.h b/src/objects/objects-inl.h
162+
--- a/src/objects/objects-inl.h
163+
+++ b/src/objects/objects-inl.h
164+
@@ -1618,11 +1618,13 @@
165+
#ifndef V8_DISABLE_WRITE_BARRIERS
166+
if (emit_write_barrier == EmitWriteBarrier::kYes) {
167+
WriteBarrier::ForValue(*this, MaybeObjectSlot(map_slot()), value,
168+
UPDATE_WRITE_BARRIER);
169+
} else {
170+
DCHECK_EQ(emit_write_barrier, EmitWriteBarrier::kNo);
171+
+#if V8_VERIFY_WRITE_BARRIERS
172+
DCHECK(!WriteBarrier::IsRequired(*this, value));
173+
+#endif
174+
}
175+
#endif
176+
}
177+
@@ -1641,10 +1643,12 @@
178+
#ifndef V8_DISABLE_WRITE_BARRIERS
179+
if (mode != SKIP_WRITE_BARRIER) {
180+
DCHECK(!value.is_null());
181+
WriteBarrier::ForValue(*this, MaybeObjectSlot(map_slot()), value, mode);
182+
} else {
183+
+#if V8_VERIFY_WRITE_BARRIERS
184+
SLOW_DCHECK(
185+
// We allow writes of a null map before root initialisation.
186+
value.is_null() ? !isolate->read_only_heap()->roots_init_complete()
187+
: !WriteBarrier::IsRequired(*this, value));
188+
+#endif
189+
}
190+
#endif
191+
}
161192
diff --git a/third_party/inspector_protocol/code_generator.py b/third_party/inspector_protocol/code_generator.py
162193
index 49952dda..268af813 100755
163194
--- a/third_party/inspector_protocol/code_generator.py

0 commit comments

Comments
 (0)