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) { |