Issue #1742 - Part 5: Remove unnecessary GCPtr::unbarrieredGet

Ref: BZ 1323441
This commit is contained in:
Jeremy Andrews 2022-05-27 07:25:48 -05:00 committed by roytam1
commit 1cdbf6eb6a
4 changed files with 3 additions and 7 deletions

View file

@ -454,10 +454,6 @@ class GCPtr : public WriteBarrieredBase<T>
DECLARE_POINTER_ASSIGN_OPS(GCPtr, T);
T unbarrieredGet() const {
return this->value;
}
private:
void set(const T& v) {
this->pre();

View file

@ -290,7 +290,7 @@ NativeObject::setSlotWithType(ExclusiveContext* cx, Shape* shape,
inline void
NativeObject::updateShapeAfterMovingGC()
{
Shape* shape = shape_.unbarrieredGet();
Shape* shape = shape_;
if (IsForwarded(shape))
shape_.unsafeSet(Forwarded(shape));
}

View file

@ -421,7 +421,7 @@ struct ObjectGroupCompartment::NewEntry
}
static inline bool match(const ObjectGroupCompartment::NewEntry& key, const Lookup& lookup) {
TaggedProto proto = key.group.unbarrieredGet()->proto().unbarrieredGet();
TaggedProto proto = key.group.unbarrieredGet()->proto();
JSObject* assoc = key.associated;
MOZ_ASSERT(proto.hasUniqueId());
MOZ_ASSERT_IF(assoc, assoc->zone()->hasUniqueId(assoc));

View file

@ -123,7 +123,7 @@ Shape::new_(ExclusiveContext* cx, Handle<StackShape> other, uint32_t nfixed)
inline void
Shape::updateBaseShapeAfterMovingGC()
{
BaseShape* base = base_.unbarrieredGet();
BaseShape* base = base_;
if (IsForwarded(base))
base_.unsafeSet(Forwarded(base));
}