Closed Bug 1163540 Opened 9 years ago Closed 9 years ago

Can't set breakpoints in tabbrowser.xml

Categories

(DevTools :: Debugger, defect)

40 Branch
defect
Not set
normal

Tracking

(firefox40 affected, firefox41 fixed)

RESOLVED FIXED
Firefox 41
Tracking Status
firefox40 --- affected
firefox41 --- fixed

People

(Reporter: Gijs, Assigned: jlong)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

With current fx-team tip:

1) open Nightly
2) open browser debugger
3) find tabbrowser.xml in the debugger
4) try to set a breakpoint in _beginRemoveTab or _endRemoveTab

ER:
get breakpoint

AR:
get breakpoint at line 5004 or thereabouts:

      <handler event="transitionend"><![CDATA[
here ==>  if (event.propertyName != "max-width")
Keywords: regression
Version: 35 Branch → 40 Branch
This is probably fallout from bug 1158498.
Assignee: nobody → ejpbruel
I bet it is from that bug. I suspect that the `element` property does not exist here XUL is weird (and this is unusual inline code). Our check to see if it's inline does not work with this, so we should add back the special case for the ".xul" extension. Eddy knows what I'm talking about...
We should fix this soon
Attached patch 1163540.patch (obsolete) — Splinter Review
Can you see if this patches fix the problem for you?

I will look into in more depth soon, but if you want a quick fix I think this should do it.
Attachment #8608796 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8608796 [details] [diff] [review]
1163540.patch

Review of attachment 8608796 [details] [diff] [review]:
-----------------------------------------------------------------

This wfm in terms of making things work again, though I do still see stuff like:


chrome://browser/content/tabbrowser.xml threw an exception: SyntaxError: expected expression, got '<'
Stack: Parser.prototype.get@resource:///modules/devtools/Parser.jsm:65:21
FilterView.prototype._doSearch@chrome://browser/content/devtools/debugger/filter-view.js:442:20
FilterView.prototype._doTokenSearch@chrome://browser/content/devtools/debugger/filter-view.js:483:5
FilterView.prototype._addCommands/<.tokenSearchCommand@chrome://browser/content/devtools/debugger/filter-view.js:113:33
Line: 65, column: 20

in my console.
Attachment #8608796 - Flags: review?(gijskruitbosch+bugs) → review+
Eddy I'll follow-up with this. Glad that this patch fixes it. We need to get a test for this, I'll see what I can do
Assignee: ejpbruel → jlong
We need an XBL file to add as a test. Something we can load up as a chrome:// page and set a breakpoint in. If you get me that, I will add it and add some basic breakpoint tests on it.
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to :Gijs Kruitbosch from comment #6)
> chrome://browser/content/tabbrowser.xml threw an exception: SyntaxError:
> expected expression, got '<'
> Stack: Parser.prototype.get@resource:///modules/devtools/Parser.jsm:65:21
> FilterView.prototype._doSearch@chrome://browser/content/devtools/debugger/
> filter-view.js:442:20
> FilterView.prototype._doTokenSearch@chrome://browser/content/devtools/
> debugger/filter-view.js:483:5
> FilterView.prototype._addCommands/<.tokenSearchCommand@chrome://browser/
> content/devtools/debugger/filter-view.js:113:33
> Line: 65, column: 20
> 
> in my console.

Yet another reason why we need to stop the pretend-all-inline-html-sources-are-one-source madness: it breaks the smart search for function definitions and all that stuff that relies on parsing the source as JS (but we should still make it fail gracefully, bug 1167303).
(I'm sorry for the delays, I had a long weekend and got back to a massive queue of stuff. I hope to get to providing a testcase here tomorrow.)
This wfm in that it loads and the binding attaches and Does Stuff. I've purposefully added most of the things I've seen in XBL (constructor, destructor, cdata/no-cdata things, handlers, methods, properties, fields). I just realized I've forgotten to add the observer method "observe" that handles callbacks from the pref observer I'm adding. Left as an exercise for the reader, I guess. :-)

(you will want to remove the bogus yield new Promise(() => false); from the end of the test, and handle opening/closing tabs the way you usually would, of course... but I don't know much about debugger tests, so I've done what I would have done had it been a browser test)
Flags: needinfo?(gijskruitbosch+bugs)
James, is there anything else I can do to help this along? This is very frustrating. :-)
Blocks: 1113209
Flags: needinfo?(jlong)
I can push the fix through, but I'll have to add a test later for this. I don't have time right now to work on the test (stuff like that usually takes about a day or so to completely get right).
Flags: needinfo?(jlong)
Attached patch 1163540.patchSplinter Review
rebased
Attachment #8608796 - Attachment is obsolete: true
Blocks: 1170745
https://hg.mozilla.org/mozilla-central/rev/7f2c34d411de
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: