summaryrefslogtreecommitdiffstats
path: root/WebCore/html/canvas/ArrayBuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/canvas/ArrayBuffer.cpp')
-rw-r--r--WebCore/html/canvas/ArrayBuffer.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/WebCore/html/canvas/ArrayBuffer.cpp b/WebCore/html/canvas/ArrayBuffer.cpp
index 0ba2ffd..3b204ff 100644
--- a/WebCore/html/canvas/ArrayBuffer.cpp
+++ b/WebCore/html/canvas/ArrayBuffer.cpp
@@ -53,26 +53,32 @@ PassRefPtr<ArrayBuffer> ArrayBuffer::create(ArrayBuffer* other)
ArrayBuffer::ArrayBuffer(void* data, unsigned sizeInBytes)
: m_sizeInBytes(sizeInBytes)
- , m_data(data) {
+ , m_data(data)
+{
}
-void* ArrayBuffer::data() {
+void* ArrayBuffer::data()
+{
return m_data;
}
-const void* ArrayBuffer::data() const {
+const void* ArrayBuffer::data() const
+{
return m_data;
}
-unsigned ArrayBuffer::byteLength() const {
+unsigned ArrayBuffer::byteLength() const
+{
return m_sizeInBytes;
}
-ArrayBuffer::~ArrayBuffer() {
+ArrayBuffer::~ArrayBuffer()
+{
WTF::fastFree(m_data);
}
-void* ArrayBuffer::tryAllocate(unsigned numElements, unsigned elementByteSize) {
+void* ArrayBuffer::tryAllocate(unsigned numElements, unsigned elementByteSize)
+{
void* result;
// Do not allow 32-bit overflow of the total size
if (numElements) {