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

Unified Diff: third_party/WebKit/Source/core/dom/DOMArrayPiece.cpp

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/DOMArrayPiece.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMArrayPiece.cpp b/third_party/WebKit/Source/core/dom/DOMArrayPiece.cpp
index 51dafc03f370ad7c486270e2f5f98bdb35b86c21..bdf69e975a0f559d9389f4ecc82b9f26aa71e995 100644
--- a/third_party/WebKit/Source/core/dom/DOMArrayPiece.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMArrayPiece.cpp
@@ -11,10 +11,11 @@
DOMArrayPiece::DOMArrayPiece(const ArrayBufferOrArrayBufferView& arrayBufferOrView, InitWithUnionOption option)
{
if (arrayBufferOrView.isArrayBuffer()) {
- DOMArrayBuffer* arrayBuffer = arrayBufferOrView.getAsArrayBuffer();
+ RefPtr<DOMArrayBuffer> arrayBuffer = arrayBufferOrView.getAsArrayBuffer();
initWithData(arrayBuffer->data(), arrayBuffer->byteLength());
} else if (arrayBufferOrView.isArrayBufferView()) {
- DOMArrayBufferView* arrayBufferView = arrayBufferOrView.getAsArrayBufferView();
+ RefPtr<DOMArrayBufferView> arrayBufferView =
+ arrayBufferOrView.getAsArrayBufferView();
initWithData(arrayBufferView->baseAddress(), arrayBufferView->byteLength());
} else if (arrayBufferOrView.isNull() && option == AllowNullPointToNullWithZeroSize) {
initWithData(nullptr, 0);
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMArrayBufferView.h ('k') | third_party/WebKit/Source/core/dom/DOMDataView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698