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

Unified Diff: Source/core/html/canvas/DataView.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/html/canvas/CanvasStyle.cpp ('k') | Source/core/html/canvas/OESVertexArrayObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/DataView.cpp
diff --git a/Source/core/html/canvas/DataView.cpp b/Source/core/html/canvas/DataView.cpp
index 7399476523b742b102fd534505282d836930f644..41b6cb3332de4afe67903d1a72e912521c557f00 100644
--- a/Source/core/html/canvas/DataView.cpp
+++ b/Source/core/html/canvas/DataView.cpp
@@ -47,19 +47,19 @@ PassRefPtr<DataView> DataView::create(unsigned length)
{
RefPtr<ArrayBuffer> buffer = ArrayBuffer::create(length, sizeof(uint8_t));
if (!buffer.get())
- return 0;
+ return nullptr;
return create(buffer, 0, length);
}
PassRefPtr<DataView> DataView::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned byteLength)
{
if (byteOffset > buffer->byteLength())
- return 0;
+ return nullptr;
CheckedInt<uint32_t> checkedOffset(byteOffset);
CheckedInt<uint32_t> checkedLength(byteLength);
CheckedInt<uint32_t> checkedMax = checkedOffset + checkedLength;
if (!checkedMax.isValid() || checkedMax.value() > buffer->byteLength())
- return 0;
+ return nullptr;
return adoptRef(new DataView(buffer, byteOffset, byteLength));
}
« no previous file with comments | « Source/core/html/canvas/CanvasStyle.cpp ('k') | Source/core/html/canvas/OESVertexArrayObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698