Closed Bug 1729602 Opened 3 years ago Closed 3 years ago

Allow passing constructor arguments through Rooted

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(4 files)

As discussed in our meeting, it may be helpful for Rooted to forward its arguments to the constructor of the contained type. (I say "may" because it appears this isn't enough to make DOM bindings dictionary types Just Work with Rooted.)

Assignee: nobody → sphink
Status: NEW → ASSIGNED
Attachment #9239971 - Attachment description: Bug 1729602 - Forward Rooted<T>(cx, ...) args to constructor T(...) → Bug 1729602 - Forward T constructor arguments through `Rooted<T> foo(cx, ...args...);`
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b277bca3bfe1 Remove the magic cx constructor handling in `Rooted<TypeConstructibleWithCx> foo(cx);` r=tcampbell,jonco https://hg.mozilla.org/integration/autoland/rev/cf7f13072e9f Forward T constructor arguments through `Rooted<T> foo(cx, ...args...);` r=tcampbell https://hg.mozilla.org/integration/autoland/rev/0f06d31a9008 Templatize RootHolder in PersistentRooted to more closely match Rooted r=tcampbell,jonco https://hg.mozilla.org/integration/autoland/rev/ba1ba9d974a4 Forward T constructor arguments through `PersistentRooted<T> foo(cx, ...args...)` r=tcampbell,jonco

Backed out 4 changesets (Bug 1729602) for causing build bustages on RootingAPI.h.
Backout link
Push with failures
Failure Log

Flags: needinfo?(sphink)

Argh, I'm an idiot. I did a try push, saw this error, fixed it, then tried to land the unfixed version.

Flags: needinfo?(sphink)
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/94040a0f2833 Remove the magic cx constructor handling in `Rooted<TypeConstructibleWithCx> foo(cx);` r=tcampbell,jonco https://hg.mozilla.org/integration/autoland/rev/6e50f1b19e7a Forward T constructor arguments through `Rooted<T> foo(cx, ...args...);` r=tcampbell https://hg.mozilla.org/integration/autoland/rev/65e82e9c91ed Templatize RootHolder in PersistentRooted to more closely match Rooted r=tcampbell,jonco https://hg.mozilla.org/integration/autoland/rev/5ccac9c66a05 Forward T constructor arguments through `PersistentRooted<T> foo(cx, ...args...)` r=tcampbell,jonco
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: