Commit b8d45035 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[arraybuffer][cleanup] Remove ArrayBufferView::SetImpl

R=haraken@chromium.org

Bug: chromium:1008840
Change-Id: I87a6ae4adfd36f3893c6eb8280931da2849b38ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929215Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718042}
parent 1e065d89
......@@ -78,8 +78,6 @@ class CORE_EXPORT ArrayBufferView : public RefCounted<ArrayBufferView> {
protected:
ArrayBufferView(scoped_refptr<ArrayBuffer>, unsigned byte_offset);
inline bool SetImpl(ArrayBufferView*, unsigned byte_offset);
// Helper to verify that a given sub-range of an ArrayBuffer is
// within range.
template <typename T>
......@@ -112,19 +110,6 @@ class CORE_EXPORT ArrayBufferView : public RefCounted<ArrayBufferView> {
scoped_refptr<ArrayBuffer> buffer_;
};
bool ArrayBufferView::SetImpl(ArrayBufferView* array, unsigned byte_offset) {
if (byte_offset > ByteLength() ||
byte_offset + array->ByteLength() > ByteLength() ||
byte_offset + array->ByteLength() < byte_offset) {
// Out of range offset or overflow
return false;
}
char* base = static_cast<char*>(BaseAddress());
memmove(base + byte_offset, array->BaseAddress(), array->ByteLength());
return true;
}
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_ARRAY_BUFFER_VIEW_H_
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