Closed
Bug 1272499
Opened 8 years ago
Closed 4 years ago
debugger only pauses once on breakpoint inside XBL handler
Categories
(DevTools :: Debugger, defect, P5)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: jhirsch, Unassigned)
References
(Blocks 1 open bug)
Details
There is a popuphiding handler defined around line 980 of autocomplete.xml:
https://dxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/autocomplete.xml#982
Open the browser toolbox, set a breakpoint at the first line of that handler. The debugger should pause at the breakpoint each time the awesomebar popup closes.
However, it only pauses execution the first time the popup closes. The debugger seems unable to attach more than once, even if other breakpoints are set inside the same file.
If the browser toolbox is closed, then reopened, and a breakpoint is set in the same spot (first line of the popuphiding handler), the debugger will again attach just once.
Comment 1•8 years ago
|
||
I know very little about XBL handlers, but is it possible that this code causes the source for the handler to be evaluated every time the popup is opened?
If this is the case, we can have multiple versions of the same source, and multiple versions of compiled scripts for each source. If a breakpoint is set on a script for an old version, but not the new one, this would explain the behavior you're seeing (we have code that is supposed to handle it, but I've seen obscure bugs there in the past).
Flags: needinfo?(6a68)
Priority: -- → P3
Reporter | ||
Comment 2•8 years ago
|
||
Sorry for the delayed response; I've been on PTO for the past few weeks.
> I know very little about XBL handlers, but is it possible that this code causes the source for the
> handler to be evaluated every time the popup is opened?
Ah yeah, I think that could be what's happening (though technically popuphiding is fired just before the popup *closes*).
According to [1], for XBL handlers, "the JavaScript body is compiled just before execution". It seems like there may be an analogy with the behavior of DOM Level 0 inline event handlers in regular HTML documents; has this problem occurred in that case as well?
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XBL/XBL_1.0_Reference/Event_Handlers
Flags: needinfo?(6a68)
Comment 3•8 years ago
|
||
(In reply to Jared Hirsch [:_6a68] [NEEDINFO please!] from comment #2)
> Sorry for the delayed response; I've been on PTO for the past few weeks.
>
> > I know very little about XBL handlers, but is it possible that this code causes the source for the
> > handler to be evaluated every time the popup is opened?
>
> Ah yeah, I think that could be what's happening (though technically
> popuphiding is fired just before the popup *closes*).
>
> According to [1], for XBL handlers, "the JavaScript body is compiled just
> before execution". It seems like there may be an analogy with the behavior
> of DOM Level 0 inline event handlers in regular HTML documents; has this
> problem occurred in that case as well?
>
> [1]
> https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XBL/XBL_1.0_Reference/
> Event_Handlers
I can't tell for sure whether this also happened with inline event handlers in regular HTML documents, but it's definitely possible.
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•5 years ago
|
Priority: P3 → P5
Updated•5 years ago
|
Blocks: dbg-breakpoint
Comment 4•4 years ago
|
||
Given that XBL isn't common anymore, I don't know if this is still an issue, but going to close since it's unlikely to be prioritized anyway.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•