summaryrefslogtreecommitdiffstats
path: root/js/src/jsfun.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 14:48:24 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 14:48:24 +0100
commit75db97cb3772fc0693947ec17c5954a04cb234a8 (patch)
treedc1035d6da831d7cedda70f770f1f17a2272ed37 /js/src/jsfun.cpp
parentfaa5f0df26e09d1f2e633618476294d112c24322 (diff)
downloadUXP-75db97cb3772fc0693947ec17c5954a04cb234a8.tar
UXP-75db97cb3772fc0693947ec17c5954a04cb234a8.tar.gz
UXP-75db97cb3772fc0693947ec17c5954a04cb234a8.tar.lz
UXP-75db97cb3772fc0693947ec17c5954a04cb234a8.tar.xz
UXP-75db97cb3772fc0693947ec17c5954a04cb234a8.zip
Bug 1320388: Move JSFunction::HAS_REST to JSScript and LazyScript
Issue #78 [Depends on] Bug 883377: Implement ES6 function "name" property semantics
Diffstat (limited to 'js/src/jsfun.cpp')
-rw-r--r--js/src/jsfun.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp
index 1e1b76d5d..2359e28a2 100644
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -1329,8 +1329,7 @@ JSFunction::getLength(JSContext* cx, uint16_t* length)
if (self->isInterpretedLazy() && !self->getOrCreateScript(cx))
return false;
- *length = self->hasScript() ? self->nonLazyScript()->funLength()
- : (self->nargs() - self->hasRest());
+ *length = self->isNative() ? self->nargs() : self->nonLazyScript()->funLength();
return true;
}
@@ -1620,7 +1619,7 @@ const JSFunctionSpec js::function_methods[] = {
JS_FN(js_apply_str, fun_apply, 2,0),
JS_FN(js_call_str, fun_call, 1,0),
JS_FN("isGenerator", fun_isGenerator,0,0),
- JS_SELF_HOSTED_FN("bind", "FunctionBind", 2, JSFUN_HAS_REST),
+ JS_SELF_HOSTED_FN("bind", "FunctionBind", 2, 0),
JS_SYM_FN(hasInstance, fun_symbolHasInstance, 1, JSPROP_READONLY | JSPROP_PERMANENT),
JS_FS_END
};