Bug 1084278 - Correct function length for functions exported to self-hosting environment. r=till
authorAndré Bargull <andrebargull@googlemail.com>
Fri, 17 Oct 2014 11:10:29 +0200
changeset 211010 31eb46071e2fd87534cbce1572bbd7d000797182
parent 211009 c04673e080a3fed69bc6e514a67f934fafb52c6e
child 211011 638e81b7b11f09a9cfce7e18ea84685c9bb9beb2
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerstill
bugs1084278
milestone36.0a1
Bug 1084278 - Correct function length for functions exported to self-hosting environment. r=till
js/src/vm/SelfHosting.cpp
--- a/js/src/vm/SelfHosting.cpp
+++ b/js/src/vm/SelfHosting.cpp
@@ -979,17 +979,17 @@ static const JSFunctionSpec intrinsic_fu
     JS_FN("std_Array_unshift",                   array_unshift,                1,0),
     JS_FN("std_Array_slice",                     array_slice,                  2,0),
     JS_FN("std_Array_sort",                      array_sort,                   1,0),
 
     JS_FN("std_Date_now",                        date_now,                     0,0),
     JS_FN("std_Date_valueOf",                    date_valueOf,                 0,0),
 
     JS_FN("std_Function_bind",                   fun_bind,                     1,0),
-    JS_FN("std_Function_apply",                  js_fun_apply,                 1,0),
+    JS_FN("std_Function_apply",                  js_fun_apply,                 2,0),
 
     JS_FN("std_Math_floor",                      math_floor,                   1,0),
     JS_FN("std_Math_max",                        math_max,                     2,0),
     JS_FN("std_Math_min",                        math_min,                     2,0),
     JS_FN("std_Math_abs",                        math_abs,                     1,0),
     JS_FN("std_Math_imul",                       math_imul,                    2,0),
     JS_FN("std_Math_log2",                       math_log2,                    1,0),
 
@@ -997,29 +997,29 @@ static const JSFunctionSpec intrinsic_fu
     JS_FN("std_Map_iterator",                    MapObject::entries,           0,0),
 
     JS_FN("std_Number_valueOf",                  js_num_valueOf,               0,0),
 
     JS_FN("std_Object_create",                   obj_create,                   2,0),
     JS_FN("std_Object_getPrototypeOf",           obj_getPrototypeOf,           1,0),
     JS_FN("std_Object_getOwnPropertyNames",      obj_getOwnPropertyNames,      1,0),
     JS_FN("std_Object_getOwnPropertyDescriptor", obj_getOwnPropertyDescriptor, 2,0),
-    JS_FN("std_Object_hasOwnProperty",           obj_hasOwnProperty,           2,0),
+    JS_FN("std_Object_hasOwnProperty",           obj_hasOwnProperty,           1,0),
 
     JS_FN("std_Set_has",                         SetObject::has,               1,0),
     JS_FN("std_Set_iterator",                    SetObject::values,            0,0),
 
     JS_FN("std_String_fromCharCode",             str_fromCharCode,             1,0),
     JS_FN("std_String_charCodeAt",               js_str_charCodeAt,            1,0),
     JS_FN("std_String_indexOf",                  str_indexOf,                  1,0),
     JS_FN("std_String_lastIndexOf",              str_lastIndexOf,              1,0),
     JS_FN("std_String_match",                    str_match,                    1,0),
     JS_FN("std_String_replace",                  str_replace,                  2,0),
     JS_FN("std_String_split",                    str_split,                    2,0),
-    JS_FN("std_String_startsWith",               str_startsWith,               2,0),
+    JS_FN("std_String_startsWith",               str_startsWith,               1,0),
     JS_FN("std_String_substring",                str_substring,                2,0),
     JS_FN("std_String_toLowerCase",              str_toLowerCase,              0,0),
     JS_FN("std_String_toUpperCase",              str_toUpperCase,              0,0),
 
     JS_FN("std_WeakMap_has",                     WeakMap_has,                  1,0),
     JS_FN("std_WeakMap_get",                     WeakMap_get,                  2,0),
     JS_FN("std_WeakMap_set",                     WeakMap_set,                  2,0),
     JS_FN("std_WeakMap_delete",                  WeakMap_delete,               1,0),
@@ -1031,17 +1031,17 @@ static const JSFunctionSpec intrinsic_fu
     JS_FN("ToInteger",               intrinsic_ToInteger,               1,0),
     JS_FN("ToString",                intrinsic_ToString,                1,0),
     JS_FN("IsCallable",              intrinsic_IsCallable,              1,0),
     JS_FN("IsConstructor",           intrinsic_IsConstructor,           1,0),
     JS_FN("OwnPropertyKeys",         intrinsic_OwnPropertyKeys,         1,0),
     JS_FN("ThrowError",              intrinsic_ThrowError,              4,0),
     JS_FN("AssertionFailed",         intrinsic_AssertionFailed,         1,0),
     JS_FN("SetScriptHints",          intrinsic_SetScriptHints,          2,0),
-    JS_FN("MakeConstructible",       intrinsic_MakeConstructible,       1,0),
+    JS_FN("MakeConstructible",       intrinsic_MakeConstructible,       2,0),
     JS_FN("_IsConstructing",         intrinsic_IsConstructing,          0,0),
     JS_FN("DecompileArg",            intrinsic_DecompileArg,            2,0),
     JS_FN("RuntimeDefaultLocale",    intrinsic_RuntimeDefaultLocale,    0,0),
 
     JS_FN("UnsafePutElements",       intrinsic_UnsafePutElements,       3,0),
     JS_FN("_DefineDataProperty",     intrinsic_DefineDataProperty,      4,0),
     JS_FN("UnsafeSetReservedSlot",   intrinsic_UnsafeSetReservedSlot,   3,0),
     JS_FN("UnsafeGetReservedSlot",   intrinsic_UnsafeGetReservedSlot,   2,0),