Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 0922f9fdbe9a291b2a5b9d1f4d0152499a46811b..8adae4e826de18f5e5f17afbec816d6bb599760e 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1260,6 +1260,10 @@ Handle<JSFunction> Factory::CreateApiFunction( |
instance_size, |
code, |
true); |
+ |
+ // Set length. |
+ result->shared()->set_length(obj->length()); |
+ |
// Set class name. |
Handle<Object> class_name = Handle<Object>(obj->class_name()); |
if (class_name->IsString()) { |