From 95db678f71ffb9e23750d188324d4f659e5a556c Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Wed, 8 Apr 2020 08:29:03 +0200 Subject: [PATCH] [js] Handle functions with rest parameters in isObservableArgumentSlot. --- js/src/jit/CompileInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jit/CompileInfo.h b/js/src/jit/CompileInfo.h index 44848890c4..f7f8c70bb8 100644 --- a/js/src/jit/CompileInfo.h +++ b/js/src/jit/CompileInfo.h @@ -487,7 +487,7 @@ class CompileInfo // Function.arguments can be used to access all arguments in non-strict // scripts, so we can't optimize out any arguments. - if ((hasArguments() || !script()->strict()) && + if ((mayReadFrameArgsDirectly_ || !script()->strict()) && firstArgSlot() <= slot && slot - firstArgSlot() < nargs()) { return true;