From 5897468de2332ba93effa619754d625e2ce73163 Mon Sep 17 00:00:00 2001 From: Fedor Date: Sun, 12 Apr 2020 13:03:19 +0300 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 44848890c..f7f8c70bb 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;