Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: Source/core/dom/DOMArrayBuffer.h

Issue 1179373004: Add DOMSharedArrayBuffer type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge master Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/DOMArrayBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMArrayBuffer.h
diff --git a/Source/core/dom/DOMArrayBuffer.h b/Source/core/dom/DOMArrayBuffer.h
index f5c605af68956cb4241f545ad462f50f365f3a08..29cac015315a4a9224feb4bb036a228d72428f2a 100644
--- a/Source/core/dom/DOMArrayBuffer.h
+++ b/Source/core/dom/DOMArrayBuffer.h
@@ -5,14 +5,13 @@
#ifndef DOMArrayBuffer_h
#define DOMArrayBuffer_h
-#include "bindings/core/v8/ScriptWrappable.h"
#include "core/CoreExport.h"
+#include "core/dom/DOMArrayBufferBase.h"
#include "wtf/ArrayBuffer.h"
-#include "wtf/RefCounted.h"
namespace blink {
-class CORE_EXPORT DOMArrayBuffer final : public RefCounted<DOMArrayBuffer>, public ScriptWrappable {
+class CORE_EXPORT DOMArrayBuffer final : public DOMArrayBufferBase {
DEFINE_WRAPPERTYPEINFO();
public:
static PassRefPtr<DOMArrayBuffer> create(PassRefPtr<WTF::ArrayBuffer> buffer)
@@ -39,12 +38,6 @@ public:
return create(WTF::ArrayBuffer::createUninitialized(numElements, elementByteSize));
}
- const WTF::ArrayBuffer* buffer() const { return m_buffer.get(); }
- WTF::ArrayBuffer* buffer() { return m_buffer.get(); }
-
- const void* data() const { return buffer()->data(); }
- void* data() { return buffer()->data(); }
- unsigned byteLength() const { return buffer()->byteLength(); }
PassRefPtr<DOMArrayBuffer> slice(int begin, int end) const
{
return create(buffer()->slice(begin, end));
@@ -61,12 +54,9 @@ public:
private:
explicit DOMArrayBuffer(PassRefPtr<WTF::ArrayBuffer> buffer)
- : m_buffer(buffer)
+ : DOMArrayBufferBase(buffer)
{
- ASSERT(m_buffer);
}
-
- RefPtr<WTF::ArrayBuffer> m_buffer;
};
} // namespace blink
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/DOMArrayBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698