Closed Bug 963167 Opened 11 years ago Closed 11 years ago

JS_SetElement() should take HandleValue rather than MutableHandleValue

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(2 files)

As was done for the JS_SetProperty() APIs in bug 896949, we should be taking HandleValue for the element value here rather than MutableHandleValue.
Not only that, it would be helpful to overload it as is being done for JS_DefineProperty() in bug 959787 so that we can pass different types without having to root a value every time.
Attached patch set-element-jsSplinter Review
Patch for changes under js/src
Attachment #8365136 - Flags: review?(sphink)
Patch for changes to the rest of the browser
Attachment #8365137 - Flags: review?(bzbarsky)
Attachment #8365136 - Flags: review?(sphink) → review+
Comment on attachment 8365137 [details] [diff] [review] set-element-browser >- pairVal = JS::ObjectValue(*pair); pairVal is now unused. Kill it off? The vast majority of these callers should be using JS_DefineElement. :( Maybe file a followup bug to fix them up? r=me
Attachment #8365137 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: