Commit 69686b14 authored by bak@chromium.org's avatar bak@chromium.org

Fixed usage of NewArgumentsObject for accessor.

Review URL: http://codereview.chromium.org/7917

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d296a229
......@@ -382,11 +382,12 @@ Object* Accessors::FunctionGetArguments(Object* object, void*) {
// mirror for the right frame.
const int length = frame->GetProvidedParametersCount();
Handle<JSObject> arguments = Factory::NewArgumentsObject(function, length);
Handle<FixedArray> array = Factory::NewFixedArray(length);
// Copy the parameters to the arguments object.
FixedArray* array = FixedArray::cast(arguments->elements());
ASSERT(array->length() == length);
for (int i = 0; i < length; i++) array->set(i, frame->GetParameter(i));
arguments->set_elements(*array);
// Return the freshly allocated arguments object.
return *arguments;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment