Make various bindings static variables const

RESOLVED FIXED in mozilla23

Status

()

defect
RESOLVED FIXED
6 years ago
a month ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

unspecified
mozilla23
x86
macOS
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.
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+
   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
https://hg.mozilla.org/mozilla-central/rev/ec0ffeafb128
https://hg.mozilla.org/mozilla-central/rev/b6771a98037b
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.