Bug 1003997. r=sfink

This commit is contained in:
Jeff Walden 2014-05-06 10:40:04 -07:00
parent cfc7563bf0
commit ccaf2695e7
2 changed files with 4 additions and 3 deletions

View File

@ -970,8 +970,10 @@ ArrayBufferViewObject::bufferObject(JSContext *cx, Handle<ArrayBufferViewObject
Rooted<TypedArrayObject *> typedArray(cx, &thisObject->as<TypedArrayObject>());
if (!TypedArrayObject::ensureHasBuffer(cx, typedArray))
return nullptr;
return thisObject->as<TypedArrayObject>().buffer();
}
return &thisObject->getFixedSlot(BUFFER_SLOT).toObject().as<ArrayBufferObject>();
MOZ_ASSERT(thisObject->is<DataViewObject>());
return &thisObject->as<DataViewObject>().arrayBuffer();
}
/* JS Friend API */

View File

@ -367,8 +367,7 @@ template <>
inline bool
JSObject::is<js::ArrayBufferViewObject>() const
{
return is<js::DataViewObject>() || is<js::TypedArrayObject>() ||
IsTypedObjectClass(getClass());
return is<js::DataViewObject>() || is<js::TypedArrayObject>();
}
#endif /* vm_TypedArrayObject_h */