Closed Bug 1191098 Opened 5 years ago Closed 5 years ago

Replace AutoHashableValueRooter with Rooted

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: terrence, Assigned: terrence)

Details

Attachments

(1 file)

This was fairly straightforward. The only complication is that both Rooted and HashableValue have a |get()| method. I wrapped HashableValue::get() as RooredBase<HashableValue>::value() to avoid the collision.
Attachment #8643327 - Flags: review?(jcoppeard)
Comment on attachment 8643327 [details] [diff] [review]
remove_AutoHashableValueRooter-v0.diff

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

Nice.

::: js/src/builtin/MapObject.h
@@ +40,5 @@
>      bool setValue(JSContext* cx, HandleValue v);
>      HashNumber hash() const;
>      bool operator==(const HashableValue& other) const;
>      HashableValue mark(JSTracer* trc) const;
>      Value get() const { return value.get(); }

Not related to this patch, but looks like this should be called value() for symmetry with setValue().
Attachment #8643327 - Flags: review?(jcoppeard) → review+
https://hg.mozilla.org/mozilla-central/rev/21c28216e5e7
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.