diff --git a/js/src/jsinferinlines.h b/js/src/jsinferinlines.h index 5c2005d3843..805ae9b38c2 100644 --- a/js/src/jsinferinlines.h +++ b/js/src/jsinferinlines.h @@ -703,7 +703,7 @@ UseNewTypeForClone(JSFunction *fun) return true; if (fun->isArrow()) - return true; + return false; if (fun->hasSingletonType()) return false; diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp index ee887837bb0..bd5778f8b40 100644 --- a/js/src/jsscript.cpp +++ b/js/src/jsscript.cpp @@ -2425,6 +2425,7 @@ js::CloneScript(JSContext *cx, HandleObject enclosingScope, HandleFunction fun, dst->funNeedsDeclEnvObject = src->funNeedsDeclEnvObject; dst->funHasAnyAliasedFormal = src->funHasAnyAliasedFormal; dst->hasSingletons = src->hasSingletons; + dst->treatAsRunOnce = src->treatAsRunOnce; dst->isGenerator = src->isGenerator; dst->isGeneratorExp = src->isGeneratorExp;