[jsdbg2] Separate Debugger maps from wrapper maps
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: jimb, Assigned: jonco)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Whenever Debugger
API creates a Debugger.Foo
object referring to something in a debuggee realm, it must record that relation in two tables: the weak map belonging to the Debugger
itself, and the compartment's cross-compartment wrapper table. This is clumsy, but it is not quite redundant: the cross-compartment wrapper table and the Debugger
's weak maps have different rules for retaining entries.
It would be simpler to have a separate table, stored on the Compartment
where the GC can find it easily, that serves both Debugger
's and the GC's needs. The GC would then need to consult two places to find all incoming edges for partial collections, but that code already includes Debugger
-specific logic anyway.
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Debuggers and debuggees are swept in the same sweep group and that is accomplished by adding edges in both directions between the debugger and debuggee zones for all debugger wrapper objects. Currently this happens by examining the cross compartment wrapper map. This patch changes this to use the debugger's weakmaps instead.
Assignee | ||
Comment 3•5 years ago
|
||
This removes the code to create CCWs for all debugger wrapper objects and updates compartment checks to query the debugger weakmaps.
Depends on D40040
Assignee | ||
Comment 4•5 years ago
|
||
Not that we no longer create debugger entries in the cross compartment wrapper map we can remove all the associated infrastructure.
Depends on D40041
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/65ef4d825770 Add sweep group edges for debugger weakmap entries r=jimb https://hg.mozilla.org/integration/autoland/rev/597a43be8c60 Don't create cross compartment wrappers for debugger wrapper objects r=jimb https://hg.mozilla.org/integration/autoland/rev/e604b2fb2eb1 Remove infrastructure for storing debugger CCWs r=jandem
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/65ef4d825770
https://hg.mozilla.org/mozilla-central/rev/597a43be8c60
https://hg.mozilla.org/mozilla-central/rev/e604b2fb2eb1
Description
•