Closed Bug 1564177 Opened 5 months ago Closed Last month

[jsdbg2] Move Debugger vector from GlobalObject to Realm

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: jimb, Assigned: loganfsmyth)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [debugger-mvp])

Attachments

(2 files)

Until the auditor architecture is implemented, a debuggee global's vector of Debuggers should be stored on the debuggee's JS::Realm structure, not as a GlobalDebuggees object pointed to by a slot on the global.

Since there are many subclasses of GlobalObject, each with their own JS::Class and hence their own finalize hook, there's no convenient place to put the cleanup of the DebuggerVector; hence the GlobalDebuggerVectorHolder object, with its custom finalizer. But this predates the existence of the JS::Realm type; now it would make more sense to let the Realm own the DebuggerVector, and let its destructor delete it naturally.

GlobalDebuggerVectorHolder's JSClass: https://searchfox.org/mozilla-central/source/js/src/debugger/Debugger.cpp#539

Priority: -- → P3
Blocks: dbg-71
Whiteboard: [debugger-mvp]
Assignee: nobody → loganfsmyth
Status: NEW → ASSIGNED

The DebuggerVector has been associated with the GlobalObject via a private slot
referencing a wrapper JS object (DebugggerVectorHolder). Moving this data into
the JS::Realm instance removes complexity and avoids needing the holder.

Attachment #9101804 - Attachment description: Bug 1564177 - Move the DebuggerVector from GlobalObject to the Realm. r=jimb! → Bug 1564177 - Part 2: Move the DebuggerVector from GlobalObject to the Realm. r=jimb!
Pushed by loganfsmyth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1d502a261370
Part 1: Clean up unused type declaration on Zone. r=jimb
https://hg.mozilla.org/integration/autoland/rev/096bd2773fc1
Part 2: Move the DebuggerVector from GlobalObject to the Realm. r=jimb
Status: ASSIGNED → RESOLVED
Closed: Last month
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.