shithub: libmujs

Download patch

ref: 7bdfc5e2db95f66145db344b6d4d18036595636a
parent: ffa8de1fc9dc0cac21f899e745b335af79e0d35b
author: Tor Andersson <tor.andersson@artifex.com>
date: Wed Jan 7 12:08:16 EST 2015

strict mode: No arguments.callee property.

Strictly speaking, access to arguments.callee and arguments.caller
should throw a TypeError, but that's a bit overkill.

--- a/jsrun.c
+++ b/jsrun.c
@@ -869,8 +869,10 @@
 
 	if (F->arguments) {
 		js_newobject(J);
-		js_currentfunction(J);
-		js_defproperty(J, -2, "callee", JS_DONTENUM);
+		if (!J->strict) {
+			js_currentfunction(J);
+			js_defproperty(J, -2, "callee", JS_DONTENUM);
+		}
 		js_pushnumber(J, n);
 		js_defproperty(J, -2, "length", JS_DONTENUM);
 		for (i = 0; i < n; ++i) {