Closed simonlindholm closed 10 years ago
If we were to add an accessor for a script's global, Debugger.Script.prototype.global, then would using frame.script.global
work as well, in this case? At present, all the frame types we actually support have scripts. The ones that don't have scripts aren't really associated with any given global, I think.
If we were to add an accessor for a script's global, Debugger.Script.prototype.global, then would using frame.script.global work as well, in this case?
For Firebug's use-cases, absolutely.
Filed as Mozilla bug 958646.
Okay, bug 958646's patch has landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/35cba8ed009d
Nice! Thanks, Jim.
I haven't been able to find a clear way to get from a frame to its owning global. It may be possible to walk
parent
links until we get to a frame with type "call" or "global", and then use(frame.callee || frame.environment.object).global
, but I'm not sure that's always correct, and in any case it seems rather fragile.Can we add
Debugger.Frame.global
?