DebuggeeFrameGeneratorScript variant of
CrossCompartmentKey doesn't carry enough information to make it unique to a single
Debugger.Frame for a generator call, so if there are ever multiple
Debugger.Frames for different calls to a single generator, they will all try to put identical entries in the cross-compartment wrapper table. Subsequent puts will overwrite the first, resulting in a single table entry attempting to serve all the
Debugger.Frames. Then, the first time a
Debugger.Frame tries to remove its key, it will remove the entry the other
Debugger.Frames expect to find there.
DebuggeeFrameGeneratorScript keys are, despite being introduced by yours truly in bug 1551176 (patch), are unnecessary. Since an
AbstractGeneratorObject and its callee's script are always in the same compartment, and the
AGO holds a strong reference to the script, the cross-compartment wrapper table entry for the edge from the
Debugger.Frame to its
AbstractGeneratorObject suffices both to document the edge from the debugger's compartment to the debuggee's, and to hold the script alive.
Currently we don't actually try to remove cross-compartment wrapper tables, but the fix for bug 1557343 will begin doing so.