Parenthesize lambda statement expressions to work in browser (where JSOPTION_ANONFUNFIX is set; followup for 593256).
authorBrendan Eich <brendan@mozilla.org>
Sat, 11 Sep 2010 15:24:51 -0700
changeset 53653 0b33419e048dc0a39c9f40538017f239e8673a56
parent 53652 65a532c7885e213d1463d8afa9e0566ad4129136
child 53654 421427ca9809d5d12b039fe0ed4457ef79111c8f
child 53840 8721b595e7ab167791c797ac16bd33c843686136
push idunknown
push userunknown
push dateunknown
bugs593256
milestone2.0b6pre
Parenthesize lambda statement expressions to work in browser (where JSOPTION_ANONFUNFIX is set; followup for 593256).
js/src/tests/js1_8_5/regress/regress-593256.js
--- a/js/src/tests/js1_8_5/regress/regress-593256.js
+++ b/js/src/tests/js1_8_5/regress/regress-593256.js
@@ -1,21 +1,21 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/licenses/publicdomain/
  */
 
 eval("\
-  function(){for(d in[0,Number]) {\
+  (function(){for(d in[0,Number]) {\
     __defineGetter__(\"\",function(){}),\
     [(__defineGetter__(\"x\",Math.pow))]\
-  }}\
+  }})\
 ")()
 delete gc
 eval("\
-  function() {\
+  (function() {\
     for(e in __defineSetter__(\"x\",function(){})){}\
-  }\
+  })\
 ")()
 delete gc
 
 reportCompare(true, true, "don't crash");