Closed Bug 1196631 Opened 9 years ago Closed 9 years ago

JS::ubi::Node::size should return 1 by default rather than 0

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: fitzgen, Assigned: fitzgen)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

... because objects cannot be zero-sized in C++. It's also a much better default, as it gives us some kind of idea of what magnitude of space we are talking about for types that haven't specialized JS::ubi::Node::size yet.
The old default was zero, but one is a better default in a couple ways: (1) there are no zero-sized things in C++ so one is closer to the truth, and (2) it gives us an idea of what magnitude of space is consumed by node specializations which don't have a JS::ubi::Node::size override yet.
Attachment #8653477 - Flags: review?(sphink)
Casting a wide try push net, because I have a sneaking suspicion that some test somewhere depends on the old default (boo). https://treeherder.mozilla.org/#/jobs?repo=try&revision=8ba65929231d
Comment on attachment 8653477 [details] [diff] [review] Make JS::ubi::Node::size return 1 by default Review of attachment 8653477 [details] [diff] [review]: ----------------------------------------------------------------- Fine with me, though I see how it could play havoc with tests.
Attachment #8653477 - Flags: review?(sphink) → review+
Semi-surprisingly, the try push looks fine!
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: