This ensures that it'll be released on any control path leaving
the function thanks to desctuctor semantics.
BUG=42925
Review URL: http://codereview.chromium.org/1712025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4554
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
int length = LocalPrototypeChainLength(*obj);
// Find the number of local properties for each of the objects.
- int* local_property_count = NewArray<int>(length);
+ ScopedVector<int> local_property_count(length);
int total_property_count = 0;
Handle<JSObject> jsproto = obj;
for (int i = 0; i < length; i++) {
}
}
- DeleteArray(local_property_count);
return *Factory::NewJSArrayWithElements(names);
}