| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index 252c97ced3177e5e0e32845e0fead4d765d34aab..ec641732d15ec03651e11c8654961161a4db4546 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -631,14 +631,16 @@ Handle<Object> Factory::NewError(const char* maker,
|
| return undefined_value();
|
| Handle<JSFunction> fun = Handle<JSFunction>::cast(fun_obj);
|
| Handle<Object> type_obj = LookupAsciiSymbol(type);
|
| - Object** argv[2] = { type_obj.location(),
|
| - Handle<Object>::cast(args).location() };
|
| + Handle<Object> argv[] = { type_obj, args };
|
|
|
| // Invoke the JavaScript factory method. If an exception is thrown while
|
| // running the factory method, use the exception as the result.
|
| bool caught_exception;
|
| Handle<Object> result = Execution::TryCall(fun,
|
| - isolate()->js_builtins_object(), 2, argv, &caught_exception);
|
| + isolate()->js_builtins_object(),
|
| + ARRAY_SIZE(argv),
|
| + argv,
|
| + &caught_exception);
|
| return result;
|
| }
|
|
|
| @@ -654,13 +656,16 @@ Handle<Object> Factory::NewError(const char* constructor,
|
| Handle<JSFunction> fun = Handle<JSFunction>(
|
| JSFunction::cast(isolate()->js_builtins_object()->
|
| GetPropertyNoExceptionThrown(*constr)));
|
| - Object** argv[1] = { Handle<Object>::cast(message).location() };
|
| + Handle<Object> argv[] = { message };
|
|
|
| // Invoke the JavaScript factory method. If an exception is thrown while
|
| // running the factory method, use the exception as the result.
|
| bool caught_exception;
|
| Handle<Object> result = Execution::TryCall(fun,
|
| - isolate()->js_builtins_object(), 1, argv, &caught_exception);
|
| + isolate()->js_builtins_object(),
|
| + ARRAY_SIZE(argv),
|
| + argv,
|
| + &caught_exception);
|
| return result;
|
| }
|
|
|
|
|