Closed Bug 1756941 Opened 4 years ago Closed 4 years ago

ObjectActor#_getOwnPropertyLength is wasteful

Categories

(DevTools :: Console, task)

task

Tracking

(firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-console-perf-2022)

Attachments

(2 files)

We're using DebuggerObject#getOwnPropertyNames to only check the length of the returned array afterward (devtools/server/actors/object.js#207)

We can probably have a dedicate DebuggerObject method to return the length instead.

This new method is being used in DevTools code to replace the usage
that was made of getOwnPropertyNames only to retrieve the length
property of the returned array.

See Also: → 1757899
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e6883d3dc73 Add DebuggerObject#getOwnPropertiesLength. r=mgaudet.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/46af5ae14b3d Rename getOwnPropertiesLength into getOwnPropertyNamesLength. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: