Commit ca2bcdf8 authored by dslomov@chromium.org's avatar dslomov@chromium.org

Remove ArrayBufferView::BaseAddress method.

We should not expose a raw pointer to typed array's backing store.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/25221002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c35559ff
...@@ -2685,10 +2685,6 @@ class V8_EXPORT ArrayBufferView : public Object { ...@@ -2685,10 +2685,6 @@ class V8_EXPORT ArrayBufferView : public Object {
* Size of a view in bytes. * Size of a view in bytes.
*/ */
size_t ByteLength(); size_t ByteLength();
/**
* Base address of a view.
*/
void* BaseAddress();
V8_INLINE static ArrayBufferView* Cast(Value* obj); V8_INLINE static ArrayBufferView* Cast(Value* obj);
......
...@@ -6022,15 +6022,6 @@ size_t v8::ArrayBufferView::ByteLength() { ...@@ -6022,15 +6022,6 @@ size_t v8::ArrayBufferView::ByteLength() {
} }
void* v8::ArrayBufferView::BaseAddress() {
i::Handle<i::JSArrayBufferView> obj = Utils::OpenHandle(this);
i::Handle<i::JSArrayBuffer> buffer(i::JSArrayBuffer::cast(obj->buffer()));
void* buffer_data = buffer->backing_store();
size_t byte_offset = static_cast<size_t>(obj->byte_offset()->Number());
return static_cast<uint8_t*>(buffer_data) + byte_offset;
}
size_t v8::TypedArray::Length() { size_t v8::TypedArray::Length() {
i::Handle<i::JSTypedArray> obj = Utils::OpenHandle(this); i::Handle<i::JSTypedArray> obj = Utils::OpenHandle(this);
return static_cast<size_t>(obj->length()->Number()); return static_cast<size_t>(obj->length()->Number());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment