diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-19 14:48:24 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-19 14:48:24 +0100 |
commit | 75db97cb3772fc0693947ec17c5954a04cb234a8 (patch) | |
tree | dc1035d6da831d7cedda70f770f1f17a2272ed37 /js/src/jsfun.cpp | |
parent | faa5f0df26e09d1f2e633618476294d112c24322 (diff) | |
download | uxp-75db97cb3772fc0693947ec17c5954a04cb234a8.tar.gz |
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.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 1e1b76d5d2..2359e28a2e 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 }; |