Closed Bug 979189 Opened 12 years ago Closed 12 years ago

Debugger.Source.element should provide an Element instead of a plain object

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: sebo, Unassigned)

Details

Referring to comment 37 and comment 49 of bug 935203. The 'element' property of Debugger.Source should provide the owning element as normal DOM Element. Sebastian
How would that work when debugging cross-process?
(In reply to Boris Zbarsky [:bz] (reviews will be slow; ask someone else) from comment #2) > How would that work when debugging cross-process? Unless I am missing something, shouldn't the Debugger object and debugger server always be in the same process as the debuggee? Then we connect from the chrome/debugging process to the server via the remote debugging protocol. See also https://bugzilla.mozilla.org/show_bug.cgi?id=937172
I *think* the issue here is simply that Debugger.Source.prototype.element is returning a Debugger.Object whose referent is the element. This seems to me like exactly what it should do. The tests were certainly written to expect this: https://hg.mozilla.org/integration/mozilla-inbound/file/e2db166682ac/toolkit/devtools/server/tests/mochitest/test_Debugger.Source.prototype.element.html#l58 If you want the element, you can use Debugger.Object.prototype.unsafeDereference --- that is, src.element.unsafeDereference should indeed be an element. I think this is a WONTFIX?
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Wait, wait, I didn't mean to change the status --- if I'm misunderstanding the original poster, or if the approach I suggested doesn't work, then there's definitely something here to fix. Sorry.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---
Yes, that does the trick. Sorry for bothering you! Sebastian
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → WORKSFORME
(In reply to Sebastian Zartner from comment #6) > Yes, that does the trick. Sorry for bothering you! No problem! Debugger generally tries to preserve the "membrane" of Debugger.Blah instances protecting the debugger from the debuggee, except when you call functions whose explicit purpose is to pierce that membrane, like unsafeDereference.
You need to log in before you can comment on or make changes to this bug.