Closed Bug 881517 Opened 7 years ago Closed 6 years ago

Remove mPrototypeNoHelper

Categories

(Core :: XPConnect, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(2 files)

I saw the JS guys trying to root this thing in bug 878160, and am pretty sure we don't need it anymore. Patches coming up.
The comments surrounding it don't make any sense to me, and most likely applied
to a pre-CPG world.
Attachment #760623 - Flags: review?(mrbkap)
This is green
Brian -

Blake says that this was probably an old performance optimization (back when Shapes were called scopes) that's trying to share a Shape for all XPCWrappedNatives that don't have a custom proto. Does this make sense in the modern world, or can we kill it and just use Object.prototype?
Flags: needinfo?(bhackett1024)
Attachment #760622 - Flags: review?(mrbkap) → review+
Comment on attachment 760623 [details] [diff] [review]
Part 2 - Remove mPrototypeNoHelper machinery. v1

I've convinced myself this is correct. The old code that decided whether or not to share the base shape with the proto did require the proto to have the same number of fixed slots as the new object and the new code no longer does.

bhackett should still chime in, though.
Attachment #760623 - Flags: review?(mrbkap) → review+
Yeah, these days objects will share an initial shape if their prototype and other attributes are the same, regardless of what that prototype is.
Flags: needinfo?(bhackett1024)
https://hg.mozilla.org/mozilla-central/rev/9a2f3ec731e4
https://hg.mozilla.org/mozilla-central/rev/a28d5406031e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.