| Index: src/api.cc
|
| ===================================================================
|
| --- src/api.cc (revision 7557)
|
| +++ src/api.cc (working copy)
|
| @@ -3960,7 +3960,9 @@
|
| EnsureInitialized("v8::Array::New()");
|
| LOG_API("Array::New");
|
| ENTER_V8;
|
| - i::Handle<i::JSArray> obj = i::Factory::NewJSArray(length);
|
| + int real_length = length > 0 ? length : 0;
|
| + i::Handle<i::JSArray> obj = i::Factory::NewJSArray(real_length);
|
| + obj->set_length(*i::Factory::NewNumberFromInt(real_length));
|
| return Utils::ToLocal(obj);
|
| }
|
|
|
| @@ -4126,11 +4128,22 @@
|
| RetainedObjectInfo* info) {
|
| if (IsDeadCheck("v8::V8::AddObjectGroup()")) return;
|
| STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**));
|
| - i::GlobalHandles::AddGroup(
|
| + i::GlobalHandles::AddObjectGroup(
|
| reinterpret_cast<i::Object***>(objects), length, info);
|
| }
|
|
|
|
|
| +void V8::AddImplicitReferences(Persistent<Object> parent,
|
| + Persistent<Value>* children,
|
| + size_t length) {
|
| + if (IsDeadCheck("v8::V8::AddImplicitReferences()")) return;
|
| + STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**));
|
| + i::GlobalHandles::AddImplicitReferences(
|
| + *Utils::OpenHandle(*parent),
|
| + reinterpret_cast<i::Object***>(children), length);
|
| +}
|
| +
|
| +
|
| int V8::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) {
|
| if (IsDeadCheck("v8::V8::AdjustAmountOfExternalAllocatedMemory()")) return 0;
|
| return i::Heap::AdjustAmountOfExternalAllocatedMemory(change_in_bytes);
|
|
|