Make various bindings static variables const

RESOLVED FIXED in mozilla23

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

unspecified
mozilla23
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

We have JSFunctionSpecs and the like, and we should make all that stuff const.
Created attachment 730500 [details] [diff] [review]
part 1.  Make JS_DefineFunctions and JS_DefineProperties take const function specs and property specs respectively.
Attachment #730500 - Flags: review?(jwalden+bmo)
Created attachment 730504 [details] [diff] [review]
part 2.  Make the bindings' various spec arrays const, and make the jitinfo structs static.
Attachment #730504 - Flags: review?(khuey)
Created attachment 730762 [details] [diff] [review]
part 2.  Make the bindings' various spec arrays const, and make the jitinfo structs static.
Attachment #730762 - Flags: review?(khuey)
Attachment #730504 - Attachment is obsolete: true
Attachment #730504 - Flags: review?(khuey)
Comment on attachment 730500 [details] [diff] [review]
part 1.  Make JS_DefineFunctions and JS_DefineProperties take const function specs and property specs respectively.

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

Please update https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_DefineProperties and https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_DefineFunctions with a note similar to what's on https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_GetClass to note the interface change.

This lack-of-const has been something that's been around forever, and a whole ton of callers have non-const static data as a result.  At least file a followup or something to add const to all of those?  I'd say better if you did it, but it's really not a good use of your time.
Attachment #730500 - Flags: review?(jwalden+bmo) → review+
Attachment #730762 - Flags: review?(khuey) → review+
   https://hg.mozilla.org/integration/mozilla-inbound/rev/ec0ffeafb128
   https://hg.mozilla.org/integration/mozilla-inbound/rev/b6771a98037b

and I've updated the documentation.  Please check over that part, because the versioning is... you know.
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla23
Oh, and filed bug 857385.
Blocks: 857385

Comment 7

5 years ago
https://hg.mozilla.org/mozilla-central/rev/ec0ffeafb128
https://hg.mozilla.org/mozilla-central/rev/b6771a98037b
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.