From 7ad5892f1285c31f0cf0ebb147d9bb3025d12df7 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 : 858bb441b82e2eceedbadae94a292a7bf03f3c36 --- 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;