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

Unified Diff: Source/wtf/ArrayBuffer.h

Issue 1302193002: Set ArrayBufferContents size to 0 on allocation failure (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | Source/wtf/ArrayBufferContents.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/ArrayBuffer.h
diff --git a/Source/wtf/ArrayBuffer.h b/Source/wtf/ArrayBuffer.h
index fd0040edee08911b868e91915c2c7f0189c9aa08..38e2a00d1a160e104fc39be3bbc1dffbc7aab01f 100644
--- a/Source/wtf/ArrayBuffer.h
+++ b/Source/wtf/ArrayBuffer.h
@@ -122,6 +122,7 @@ PassRefPtr<ArrayBuffer> ArrayBuffer::create(const void* source, unsigned byteLen
PassRefPtr<ArrayBuffer> ArrayBuffer::create(ArrayBufferContents& contents)
{
+ RELEASE_ASSERT(contents.data());
return adoptRef(new ArrayBuffer(contents));
}
« no previous file with comments | « no previous file | Source/wtf/ArrayBufferContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698