Bug 898356 Part 10 -- Barrier updates to private data for typed object views r=terrence
authorNicholas D. Matsakis <nmatsakis@mozilla.com>
Wed, 19 Feb 2014 23:18:23 -0500
changeset 170079 cc73b1f7a47d82829a30cbb78810ad9a434c2fcd
parent 170078 5c4cec0ab08af499f37190f0f225e725209a9bf2
child 170080 cc5ce0bdff58550078b3584a1a914903530d8336
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersterrence
bugs898356
milestone30.0a1
Bug 898356 Part 10 -- Barrier updates to private data for typed object views r=terrence
js/src/builtin/TypedObject.cpp
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -1413,17 +1413,17 @@ TypedObject::createUnattachedWithClass(J
 
 void
 TypedObject::attach(ArrayBufferObject &buffer, int32_t offset)
 {
     JS_ASSERT(offset >= 0);
     JS_ASSERT(offset + size() <= buffer.byteLength());
 
     buffer.addView(this);
-    setPrivate(buffer.dataPointer() + offset);
+    InitArrayBufferViewDataPointer(this, &buffer, offset);
     setReservedSlot(JS_TYPEDOBJ_SLOT_BYTEOFFSET, Int32Value(offset));
     setReservedSlot(JS_TYPEDOBJ_SLOT_OWNER, ObjectValue(buffer));
 }
 
 void
 TypedObject::attach(TypedObject &typedObj, int32_t offset)
 {
     attach(typedObj.owner(), typedObj.offset() + offset);