Open
Bug 1236748
Opened 8 years ago
Updated 21 hours ago
SpiderMonkey's object metadata callback should probably just be a hard-coded function
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: jimb, Unassigned)
References
(Blocks 1 open bug)
Details
We should delete SetObjectMetadataCallback and restrict metadata to that collected for the Debugger API. Turning metadata collection on and off should be soley up to the Debugger. We're not using the flexibility. The SetObjectMetadataCallback API allows the embedding to set any metadata callback that it likes, but in practice only one is ever used: SavedStacksMetadataCallback, the one used by the Debugger API. Supporting multiple callbacks costs us complexity. We try to avoid stepping on conflicting callbacks: operations like enabling collection are fallible, and multi-compartment operations need rollback code.
Comment 1•8 years ago
|
||
I think :njn may have been using this in custom builds to record allocations at some point in time, but that should be superseded by Debugger.Memory's allocation site tracking and logging[0]. If not, we should add support for whatever is missing! :njn, are you still using the object metadata callback at all? In a way that isn't supported by the Debugger.Memory API? [0] https://developer.mozilla.org/en-US/docs/Tools/Debugger-API/Debugger.Memory#Allocation_Site_Tracking
Flags: needinfo?(n.nethercote)
Comment 2•8 years ago
|
||
> :njn, are you still using the object metadata callback at all?
Nope. Feel free to simplify it.
Flags: needinfo?(n.nethercote)
Updated•2 years ago
|
Severity: normal → S3
Comment 3•2 months ago
|
||
Rummaging around this still seems to be true; the only consumers of this is shell testing or the debugger and so we should continue to clean this up.
You need to log in
before you can comment on or make changes to this bug.
Description
•