Closed Bug 855582 Opened 8 years ago Closed 7 years ago

Make various bindings static variables const

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(2 files, 1 obsolete file)

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
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.