summaryrefslogtreecommitdiffstats
path: root/js/src/jsapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jsapi.cpp')
-rw-r--r--js/src/jsapi.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
index e6fc1f98b..bbf467808 100644
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -3435,10 +3435,7 @@ JS::NewFunctionFromSpec(JSContext* cx, const JSFunctionSpec* fs, HandleId id)
{
return nullptr;
}
- JSFunction* fun = &funVal.toObject().as<JSFunction>();
- if (fs->flags & JSFUN_HAS_REST)
- fun->setHasRest();
- return fun;
+ return &funVal.toObject().as<JSFunction>();
}
RootedAtom atom(cx, IdToFunctionName(cx, id));