Commit fa2eb617 authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

[compiler] Make AccessorAccessInfoHelper read of module cell relaxed

... as the main thread might change its contents.

Bug: v8:12174, v8:7790
Change-Id: I66b2cafc7ddc9b387223693595a9d810b272d7b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3141586Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76685}
parent 214d7e40
......@@ -544,7 +544,7 @@ PropertyAccessInfo AccessorAccessInfoHelper(
Handle<Cell> cell = broker->CanonicalPersistentHandle(
Cell::cast(module_namespace->module().exports().Lookup(
isolate, name.object(), Smi::ToInt(name.object()->GetHash()))));
if (cell->value().IsTheHole(isolate)) {
if (cell->value(kRelaxedLoad).IsTheHole(isolate)) {
// This module has not been fully initialized yet.
return PropertyAccessInfo::Invalid(zone);
}
......
......@@ -20,6 +20,10 @@ namespace internal {
TQ_OBJECT_CONSTRUCTORS_IMPL(Cell)
DEF_RELAXED_GETTER(Cell, value, Object) {
return TaggedField<Object, kValueOffset>::Relaxed_Load(cage_base, *this);
}
} // namespace internal
} // namespace v8
......
......@@ -19,6 +19,9 @@ class Cell : public TorqueGeneratedCell<Cell, HeapObject> {
public:
inline Address ValueAddress() { return address() + kValueOffset; }
using TorqueGeneratedCell::value;
DECL_RELAXED_GETTER(value, Object)
using BodyDescriptor = FixedBodyDescriptor<kValueOffset, kSize, kSize>;
TQ_OBJECT_CONSTRUCTORS(Cell)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment