Closed Bug 752632 Opened 12 years ago Closed 12 years ago

Support building SpiderMonkey without E4X by doing: configure --disable-e4x

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

(Whiteboard: [js:p1:fx15])

Attachments

(1 file)

Attached patch v1Splinter Review
Terrence asked for this in bug 752092 and it was pretty straightforward.
Attachment #621686 - Flags: review?(jimb)
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.
Depends on: 752092
Review ping.
Comment on attachment 621686 [details] [diff] [review]
v1

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

::: js/src/configure.in
@@ +4420,5 @@
> +dnl = E4X support (ECMA-357)
> +dnl ========================================================
> +JS_HAS_XML_SUPPORT=1
> +MOZ_ARG_DISABLE_BOOL(e4x,
> +[  --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.)
Attachment #621686 - Flags: review?(jimb) → review+
Whiteboard: [js:p1:fx15]
https://hg.mozilla.org/mozilla-central/rev/1a4d8e3ce3d6
Assignee: general → jorendorff
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: