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)
Core
JavaScript Engine
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
Comment 1•12 years ago
|
||
> Referring to comment 37 and comment 49 of bug 935203.
Proper links:
Referring to bug 935203 comment 37 and bug 935203 comment 49.
Honza
Comment 2•12 years ago
|
||
How would that work when debugging cross-process?
Comment 3•12 years ago
|
||
(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
Comment 4•12 years ago
|
||
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
Comment 5•12 years ago
|
||
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 → ---
| Reporter | ||
Comment 6•12 years ago
|
||
Yes, that does the trick. Sorry for bothering you!
Sebastian
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → WORKSFORME
Comment 7•12 years ago
|
||
(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.
Description
•