Closed Bug 1469444 Opened Last year Closed Last year

Add MOZ_INIT_OUTSIDE_CTOR to ArraySpeciesLookup fields that are so initialized

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

No description provided.
Attached patch PatchSplinter Review
This is slightly more rigorous about exactly what state-fields are valid/checked at any given moment, and it gives some validity-detecting poisoning to boot.
Attachment #8986074 - Flags: review?(andrebargull)
Comment on attachment 8986074 [details] [diff] [review]
Patch

Review of attachment 8986074 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/builtin/Array.h
@@ +271,5 @@
>      bool isArrayStateStillSane();
>  
>    public:
> +    /** Construct an |ArraySpeciesLookup| in the uninitialized state. */
> +    ArraySpeciesLookup() = default;

Not sure if it matters, but the "validity-detecting poisoning" won't apply for newly created ArraySpeciesLookup instances if |reset()| isn't called here anymore. :-)
Attachment #8986074 - Flags: review?(andrebargull) → review+
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6ce73daf92dc
Add MOZ_INIT_OUTSIDE_CTOR to ArraySpeciesLookup fields that are so initialized.  r=anba
Oh, whoops -- I did want validity-detecting poison to be applied to ArraySpeciesLookup by default.  Readded the |purge();| to the body there and landed.
https://hg.mozilla.org/mozilla-central/rev/6ce73daf92dc
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.