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

Unified Diff: third_party/WebKit/Source/wtf/ArrayBufferBuilder.h

Issue 1414553002: Fix out-of-memory crashes related to ArrayBuffer allocation Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/wtf/ArrayBufferBuilder.h
diff --git a/third_party/WebKit/Source/wtf/ArrayBufferBuilder.h b/third_party/WebKit/Source/wtf/ArrayBufferBuilder.h
index 38b285a0bf02dbec54bda02d7985b31e80899bda..f294a732c4e093994334cc04a327b94d02ac21e5 100644
--- a/third_party/WebKit/Source/wtf/ArrayBufferBuilder.h
+++ b/third_party/WebKit/Source/wtf/ArrayBufferBuilder.h
@@ -53,7 +53,7 @@ public:
: m_bytesUsed(0)
, m_variableCapacity(true)
{
- m_buffer = ArrayBuffer::create(capacity, 1);
+ m_buffer = ArrayBuffer::createOrNull(capacity, 1);
}
bool isValid() const

Powered by Google App Engine
This is Rietveld 408576698