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

RESOLVED FIXED in mozilla15

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jorendorff, Assigned: jorendorff)

Tracking

Other Branch
mozilla15
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:p1:fx15])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 621686 [details] [diff] [review]
v1

Terrence asked for this in bug 752092 and it was pretty straightforward.
Attachment #621686 - Flags: review?(jimb)
(Assignee)

Comment 1

5 years ago
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.
(Assignee)

Updated

5 years ago
Depends on: 752092
(Assignee)

Comment 2

5 years ago
Review ping.

Comment 3

5 years ago
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]
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a4d8e3ce3d6

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/1a4d8e3ce3d6
Assignee: general → jorendorff
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.