Index: src/runtime.cc |
=================================================================== |
--- src/runtime.cc (revision 3449) |
+++ src/runtime.cc (working copy) |
@@ -7884,7 +7884,8 @@ |
HandleScope scope; |
- int initial_size = limit < 10 ? limit : 10; |
+ limit = Max(limit, 0); // Ensure that limit is not negative. |
+ int initial_size = Min(limit, 10); |
Handle<JSArray> result = Factory::NewJSArray(initial_size * 3); |
StackFrameIterator iter; |