As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 752632 - Support building SpiderMonkey without E4X by doing: configure --disable-e4x
: Support building SpiderMonkey without E4X by doing: configure --disable-e4x
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: All All
: -- normal (vote)
: mozilla15
Assigned To: Jason Orendorff [:jorendorff]
: Jason Orendorff [:jorendorff]
Depends on: 752092
  Show dependency treegraph
Reported: 2012-05-07 12:32 PDT by Jason Orendorff [:jorendorff]
Modified: 2012-05-31 06:30 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v1 (7.13 KB, patch)
2012-05-07 12:32 PDT, Jason Orendorff [:jorendorff]
jimb: review+
Details | Diff | Splinter Review

Description User image Jason Orendorff [:jorendorff] 2012-05-07 12:32:03 PDT
Created attachment 621686 [details] [diff] [review]

Terrence asked for this in bug 752092 and it was pretty straightforward.
Comment 1 User image Jason Orendorff [:jorendorff] 2012-05-07 12:39:18 PDT
Up to now, E4X support has been on by default. It depends on the preprocessor macro JS_HAS_XML_SUPPORT which is (conditionally -- but always, in practice) defined to be 1 in jsversion.h. There's no convenient way to turn it off.

With this patch, E4X support is still on by default. However JS_HAS_XML_SUPPORT is now defined in js-config.h (1 by default) and you can turn it off by configuring with --disable-e4x.
Comment 2 User image Jason Orendorff [:jorendorff] 2012-05-15 12:24:41 PDT
Review ping.
Comment 3 User image Jim Blandy :jimb 2012-05-18 16:09:22 PDT
Comment on attachment 621686 [details] [diff] [review]

Review of attachment 621686 [details] [diff] [review]:

::: js/src/
@@ +4420,5 @@
> +dnl = E4X support (ECMA-357)
> +dnl ========================================================
> +[  --disable-e4x Disable JS support for XML (ECMA-357)],

Most of these try to indent the description to appear at column 26.

::: js/src/jsversion.h
@@ -90,5 @@
>  #define JS_HAS_UNEVAL           0       /* has uneval() top-level function */
>  #define JS_HAS_CONST            0       /* has JS2 const as alternative var */
>  #define JS_HAS_FUN_EXPR_STMT    0       /* has function expression statement */
>  #define JS_HAS_NO_SUCH_METHOD   0       /* has o.__noSuchMethod__ handler */
> -#define JS_HAS_XML_SUPPORT      0       /* has ECMAScript for XML support */

Huh. I wonder if embedders are selecting old versions of the language, and counting on E4X not being there. (Not worth holding the bug for, though.)
Comment 4 User image Jason Orendorff [:jorendorff] 2012-05-30 13:16:31 PDT
Comment 5 User image Ed Morley [:emorley] 2012-05-31 06:30:51 PDT

Note You need to log in before you can comment on or make changes to this bug.