Stop cloning frame objects -- Unify all frame objects
Categories
(DevTools :: Debugger, enhancement)
Tracking
(firefox116 fixed)
| Tracking | Status | |
|---|---|---|
| firefox116 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(3 files)
The Call Stack panel currently uses different types of frame objects where we augment the common one with library attribute.
This is done from a selector and so we:
- duplicate the frame objects (many times!)
- we recompute these objects on many state change instead of computing this additional attribute once per frame object
This also doesn't help understanding our codebase as a frame list or a frame object in our codebase may refer to distinct object, with different attributes and be distinct object instances.
| Assignee | ||
Comment 1•2 years ago
|
||
This is now redundant with frame.location.source.
Also clarify the integration of SmartTrace with Frames component.
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
And more importantly, stop cloning all frame objects!
Also ensure that this attribute is set the earliest possible,
so that any code using frame objects could use this attribute and not only the callstack.
One side effect of this changeset is that frame grouping per library now work
both with original and generated stack frames.
This is because we only lookup for source url via frame.location.source.url,
so that we always use the original source URL for all library checks.
The library checks are not working on the bundle URL... and for now the frames
are having their location attribute hacked to be set to the generated location
when we are showing generated location.
| Assignee | ||
Comment 3•2 years ago
|
||
Because the React component were always reading frame.location,
the selector had to clone all frame objects in order to sometimes
store the generated location in frame.location.
Instead the React component can read the shouldDisplayOriginalLocation state
and either use frame.location -or- frame.generatedLocation.
Similarly to what we do in most places for breakpoints.
Comment 5•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/bb685d419898
https://hg.mozilla.org/mozilla-central/rev/2dc6e26a72e9
https://hg.mozilla.org/mozilla-central/rev/e3c29fe798a7
Description
•