Closed Bug 381031 Opened 17 years ago Closed 17 years ago

make JS1.8 the default for <xul:script>

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha6

People

(Reporter: asqueella, Assigned: asqueella)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 2 obsolete files)

From bug 380236 comment 7:

Mike Shaver   2007-05-10 05:32:08 PDT

Related (I think): can/should we make JS1.8 the default for XUL-loaded JS in
Gecko 1.9?  We didn't in 1.8.1 for good compatibility reasons, but it makes for
a lot of poking around by extension and app authors to get the right versioning
parameters, and I think we'd do better by them in 1.9 to make the switch.
Flags: blocking1.9?
Summary: make JS1.8 the default for XUL-loaded JS → make JS1.8 the default for <xul:script>
Flags: blocking1.9? → blocking1.9-
Attached patch patch (obsolete) — Splinter Review
(Depends on bug 382182.)

I dislike how it duplicates the version constant from the JS_SetVersion call here: http://mxr.mozilla.org/seamonkey/source/js/src/xpconnect/loader/mozJSComponentLoader.cpp#514

Would it be better to add a JSVERSION_LATEST value to the JSVersion enum?
Attachment #266300 - Flags: review?(brendan)
Depends on: 382182
Yes, JSVERSION_LATEST -- just do it in this bug.

/be
Nickolay: ping? I can approve that patch but would rather see JSVERSION_LATEST, unless you prefer to do it in a separate bug.

/be
Sorry, didn't have the time near my dev machine lately. I'll post an updated patch  tonight or tomorrow.
Attached patch patch with JSVERSION_LATEST (obsolete) — Splinter Review
Better late than never!
Assignee: nobody → asqueella
Attachment #266300 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #267630 - Flags: review?(brendan)
Attachment #266300 - Flags: review?(brendan)
Comment on attachment 267630 [details] [diff] [review]
patch with JSVERSION_LATEST


>             rv = mimeHdrParser->GetParameter(typeAndParams, "version",
>                                              EmptyCString(), PR_FALSE, nsnull,
>                                              versionName);
>             if (NS_FAILED(rv)) {
[snip]
>+              // no version specified - version remains the default.
>+              if (rv != NS_ERROR_INVALID_ARG)
>+                return rv;

Since you fixed indentation here, could you also move the "no version specified ..." comment to after the if-early-return, which is exclusive of the comment's sense?

r+sr=me with that, thanks.

/be
Attachment #267630 - Flags: superreview+
Attachment #267630 - Flags: review?(brendan)
Attachment #267630 - Flags: review+
Attachment #267630 - Attachment is obsolete: true
mozilla/content/xul/document/src/nsXULContentSink.cpp 	1.183
mozilla/js/src/jspubtd.h 	3.84
mozilla/js/src/xpconnect/loader/mozJSComponentLoader.cpp 	1.136
mozilla/extensions/jssh/nsJSSh.cpp 	1.11
Brendan, thanks for the quick reviews.

Gavin, thanks for the checkin.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha6
Blocks: 385159
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: