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

Unified Diff: third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h

Issue 1964183004: Revert of Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h
diff --git a/third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h b/third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h
index 1b6572ed9e67e65a725701918a9075ace007cf9d..75900678626198a4289f02fe5b37d0ab9d9d6640 100644
--- a/third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h
+++ b/third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h
@@ -14,20 +14,20 @@
class CORE_EXPORT DOMSharedArrayBuffer final : public DOMArrayBufferBase {
DEFINE_WRAPPERTYPEINFO();
public:
- static DOMSharedArrayBuffer* create(PassRefPtr<WTF::ArrayBuffer> buffer)
+ static PassRefPtr<DOMSharedArrayBuffer> create(PassRefPtr<WTF::ArrayBuffer> buffer)
{
DCHECK(buffer->isShared());
- return new DOMSharedArrayBuffer(buffer);
+ return adoptRef(new DOMSharedArrayBuffer(buffer));
}
- static DOMSharedArrayBuffer* create(unsigned numElements, unsigned elementByteSize)
+ static PassRefPtr<DOMSharedArrayBuffer> create(unsigned numElements, unsigned elementByteSize)
{
return create(WTF::ArrayBuffer::createShared(numElements, elementByteSize));
}
- static DOMSharedArrayBuffer* create(const void* source, unsigned byteLength)
+ static PassRefPtr<DOMSharedArrayBuffer> create(const void* source, unsigned byteLength)
{
return create(WTF::ArrayBuffer::createShared(source, byteLength));
}
- static DOMSharedArrayBuffer* create(WTF::ArrayBufferContents& contents)
+ static PassRefPtr<DOMSharedArrayBuffer> create(WTF::ArrayBufferContents& contents)
{
DCHECK(contents.isShared());
return create(WTF::ArrayBuffer::create(contents));
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp ('k') | third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698