Index: src/factory.cc |
=================================================================== |
--- src/factory.cc (revision 478) |
+++ src/factory.cc (working copy) |
@@ -283,10 +283,12 @@ |
Handle<Object> Factory::NewError(const char* maker, const char* type, |
Vector< Handle<Object> > args) { |
HandleScope scope; |
- Handle<JSArray> array = NewJSArray(args.length()); |
- for (int i = 0; i < args.length(); i++) |
- SetElement(array, i, args[i]); |
- Handle<Object> result = NewError(maker, type, array); |
+ Handle<FixedArray> array = Factory::NewFixedArray(args.length()); |
+ for (int i = 0; i < args.length(); i++) { |
+ array->set(i, *args[i]); |
+ } |
+ Handle<JSArray> object = Factory::NewJSArrayWithElements(array); |
+ Handle<Object> result = NewError(maker, type, object); |
return result.EscapeFrom(&scope); |
} |