Closed Bug 1441988 Opened 2 years ago Closed 2 years ago

Refactor repeated AutoVector definitions

Categories

(Core :: JavaScript: GC, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

This is just a small cleanup, but we can replace the repeated AutoBlahVector definitions with a template.  I simplified appendAll() as well.
Attachment #8954902 - Flags: review?(sphink)
Attachment #8954902 - Flags: review?(sphink) → review+
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bda8de97a6a9
Simplify AutoVector definitions by making this a template r=sfink
This seems to have broken the SM rust build.  The logs show:

[task 2018-03-01T15:07:18.103Z] error[E0243]: wrong number of type arguments: expected 1, found 0
[task 2018-03-01T15:07:18.103Z]     --> /builds/worker/workspace/build/src/js/rust/target/debug/build/js-39ce6d9106dd0171/out/jsapi_debug.rs:2849:24
[task 2018-03-01T15:07:18.103Z]      |
[task 2018-03-01T15:07:18.103Z] 2849 |             pub _base: root::JS::Rooted,
[task 2018-03-01T15:07:18.103Z]      |                        ^^^^^^^^^^^^^^^^ expected 1 type argument
[task 2018-03-01T15:07:18.103Z] 
[task 2018-03-01T15:07:18.277Z] error: aborting due to previous error
[task 2018-03-01T15:07:18.277Z] 
[task 2018-03-01T15:07:18.502Z] error[E0243]: wrong number of type arguments: expected 1, found 0
[task 2018-03-01T15:07:18.502Z]     --> /builds/worker/workspace/build/src/js/rust/target/debug/build/js-39ce6d9106dd0171/out/jsapi_debug.rs:2849:24
[task 2018-03-01T15:07:18.502Z]      |
[task 2018-03-01T15:07:18.502Z] 2849 |             pub _base: root::JS::Rooted,
[task 2018-03-01T15:07:18.502Z]      |                        ^^^^^^^^^^^^^^^^ expected 1 type argument
[task 2018-03-01T15:07:18.502Z] 
[task 2018-03-01T15:07:18.510Z] error: Could not compile `js`.

rustc --explain says of this error:

This error indicates that not enough type parameters were found in a type or
trait.

Which seems plausible.  But I can't reproduce this locally.

The problem is probably that I made AutoIdVector and AutoObjectVector into instantiations of an AutoVector template rather than classes in their own right.
fitzgen suggested adding Auto*.Vector to OPAQUE_TYPES in js/rust/build.rs.
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/33432803d920
Fix rust build bustage by adding Auto*Vector to list of opaque types r=me
https://hg.mozilla.org/mozilla-central/rev/bda8de97a6a9
https://hg.mozilla.org/mozilla-central/rev/33432803d920
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.