Skip to content

Commit 7c38dd6

Browse files
committed
Implementation of Object::New(Isolate*,Local<Value>,Local<Name>*,Local<Value>*,size_t).
1 parent 8cab7bb commit 7c38dd6

File tree

1 file changed

+10
-0
lines changed
  • graal-nodejs/deps/v8/src/graal

1 file changed

+10
-0
lines changed

graal-nodejs/deps/v8/src/graal/v8.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,16 @@ namespace v8 {
705705
return GraalObject::New(isolate);
706706
}
707707

708+
Local<Object> Object::New(Isolate* isolate, Local<Value> prototype_or_null, Local<Name>* names, Local<Value>* values, size_t length) {
709+
Local<Object> v8_object = Object::New(isolate);
710+
GraalObject* graal_object = reinterpret_cast<GraalObject*> (*v8_object);
711+
graal_object->SetPrototype(prototype_or_null);
712+
for (int i = 0; i < length; i++) {
713+
graal_object->Set(names[i], values[i]);
714+
}
715+
return v8_object;
716+
}
717+
708718
Maybe<bool> Object::SetAccessor(
709719
Local<Context> context,
710720
Local<Name> name,

0 commit comments

Comments
 (0)