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

Unified Diff: Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp

Issue 7585017: Merge 92413 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 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
Index: Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
===================================================================
--- Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp (revision 92504)
+++ Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp (working copy)
@@ -386,6 +386,9 @@
JSC::JSObject* object = asObject(value);
int32_t length = object->get(exec, JSC::Identifier(exec, "length")).toInt32(exec);
+
+ if (!vector.tryReserveCapacity(length))
+ return false;
vector.resize(length);
for (int32_t i = 0; i < length; ++i) {

Powered by Google App Engine
This is Rietveld 408576698