From db3df46fd60011ba4eb9a4f4b38821081d88397d Mon Sep 17 00:00:00 2001 From: Terrence Cole Date: Wed, 13 Mar 2013 16:58:40 -0700 Subject: [PATCH] Bug 850922 - Don't put NULL getterobj/setterobj in the reloctable store buffers; r=billm --HG-- extra : rebase_source : 21ac1e5d6cba8a0771c9612c304ff4206a29f902 --- js/src/vm/Shape-inl.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/src/vm/Shape-inl.h b/js/src/vm/Shape-inl.h index d1e263ea73d3..6fa3157c99cb 100644 --- a/js/src/vm/Shape-inl.h +++ b/js/src/vm/Shape-inl.h @@ -106,15 +106,17 @@ BaseShape::operator=(const BaseShape &other) getterObj = other.getterObj; GetterSetterWriteBarrierPost(runtime(), &getterObj); } else { + if (rawGetter) + GetterSetterWriteBarrierPostRemove(runtime(), &getterObj); rawGetter = other.rawGetter; - GetterSetterWriteBarrierPostRemove(runtime(), &getterObj); } if (flags & HAS_SETTER_OBJECT) { setterObj = other.setterObj; GetterSetterWriteBarrierPost(runtime(), &setterObj); } else { + if (rawSetter) + GetterSetterWriteBarrierPostRemove(runtime(), &setterObj); rawSetter = other.rawSetter; - GetterSetterWriteBarrierPostRemove(runtime(), &setterObj); } compartment_ = other.compartment_; return *this;