Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1133)

Unified Diff: src/factory.cc

Issue 11631002: Extend API to allow setting length property for function templates. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Support length as argument to FunctionTempalte::New Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « src/api.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698