Closed
Bug 876806
Opened 12 years ago
Closed 12 years ago
Restart-less add-ons' scripts do not show up in browser debugger.
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox22 wontfix, firefox23 verified, firefox24 verified, firefox25 verified)
VERIFIED
FIXED
Firefox 25
People
(Reporter: Optimizer, Assigned: past)
References
Details
(Whiteboard: [chrome-debug])
Attachments
(1 file, 1 obsolete file)
890 bytes,
patch
|
vporof
:
review+
bajaj
:
approval-mozilla-aurora+
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Using latest nightly:
1. Install this addon for example : https://addons.mozilla.org/en-US/firefox/addon/ui-enhancer/
2. Open up Browser debugger .
3. None of the script show up. Atleast the bootstrap.js should show up.
Reporter | ||
Comment 1•12 years ago
|
||
None of its scripts*
Updated•12 years ago
|
Whiteboard: [chrome-debug]
Updated•12 years ago
|
Priority: -- → P2
Assignee | ||
Comment 2•12 years ago
|
||
I have a fix for this.
Assignee: ejpbruel → past
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•12 years ago
|
||
(In reply to Panos Astithas [:past] from comment #2)
> I have a fix for this.
http://ragemaker.net/images/Happy/happy%20crying.png
Assignee | ||
Comment 4•12 years ago
|
||
uri.hostPort was throwing for jar: URLs. With this patch I can now step through the code of the add-on in comment 0.
Attachment #771284 -
Flags: review?(vporof)
Comment 5•12 years ago
|
||
Comment on attachment 771284 [details] [diff] [review]
Properly parse jar: URLs from add-ons
Review of attachment 771284 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/devtools/debugger/debugger-panes.js
@@ +1068,5 @@
> }
>
> + let { scheme, directory, fileName } = uri;
> + let hostPort;
> + // Add-on SDK jar: URLs may cause this to throw.
!!
Any clue why? I don't particularly care, but it'd be nice to explain it here if you know.
@@ +1072,5 @@
> + // Add-on SDK jar: URLs may cause this to throw.
> + try {
> + hostPort = uri.hostPort;
> + } catch (e) {
> + dumpn(e);
Could you also add the Cu.report error with an explicit message extravaganza here please?
Attachment #771284 -
Flags: review?(vporof) → review+
Assignee | ||
Comment 6•12 years ago
|
||
(In reply to Victor Porof [:vp] from comment #5)
> > + // Add-on SDK jar: URLs may cause this to throw.
>
> !!
>
> Any clue why? I don't particularly care, but it'd be nice to explain it here
> if you know.
I dug a little deeper and this is apparently by design:
http://mxr.mozilla.org/mozilla-central/source/modules/libjar/nsJARURI.cpp#376
> @@ +1072,5 @@
> > + // Add-on SDK jar: URLs may cause this to throw.
> > + try {
> > + hostPort = uri.hostPort;
> > + } catch (e) {
> > + dumpn(e);
>
> Could you also add the Cu.report error with an explicit message extravaganza
> here please?
Armed with this newfound knowledge I modified the code to avoid the exception instead of catch it.
Attachment #772013 -
Flags: review?(vporof)
Comment 7•12 years ago
|
||
Comment on attachment 772013 [details] [diff] [review]
Properly parse jar: URLs from add-ons
Review of attachment 772013 [details] [diff] [review]:
-----------------------------------------------------------------
This is the last time I'm being surprised by things not working by design.
Attachment #772013 -
Flags: review?(vporof) → review+
Updated•12 years ago
|
Whiteboard: [chrome-debug] → [chrome-debug][land-in-fx-team]
Reporter | ||
Comment 8•12 years ago
|
||
Can this be uplifted to Aurora (if not beta) ?
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #8)
> Can this be uplifted to Aurora (if not beta) ?
Yes, I'll ask for approval after the patch lands.
Assignee | ||
Updated•12 years ago
|
Attachment #771284 -
Attachment is obsolete: true
Assignee | ||
Comment 10•12 years ago
|
||
Whiteboard: [chrome-debug][land-in-fx-team] → [chrome-debug][fixed-in-fx-team]
Comment 11•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [chrome-debug][fixed-in-fx-team] → [chrome-debug]
Target Milestone: --- → Firefox 25
Assignee | ||
Comment 12•12 years ago
|
||
Comment on attachment 772013 [details] [diff] [review]
Properly parse jar: URLs from add-ons
[Approval Request Comment]
Bug caused by (feature/regressing bug #): probably bug 812083
User impact if declined: add-on developers won't be able to debug their add-ons using the debugger
Testing completed (on m-c, etc.): fx-team and m-c
Risk to taking this patch (and alternatives if risky): minor risk, this is a tiny patch to a feature targeting developers
String or IDL/UUID changes made by this patch: none
Attachment #772013 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 13•12 years ago
|
||
Comment on attachment 772013 [details] [diff] [review]
Properly parse jar: URLs from add-ons
[Approval Request Comment]
Bug caused by (feature/regressing bug #): probably bug 812083
User impact if declined: add-on developers won't be able to debug their add-ons using the debugger
Testing completed (on m-c, etc.): fx-team and m-c
Risk to taking this patch (and alternatives if risky): minor risk, this is a tiny patch to a feature targeting developers
String or IDL/UUID changes made by this patch: none
Attachment #772013 -
Flags: approval-mozilla-beta?
Comment 14•12 years ago
|
||
Comment on attachment 772013 [details] [diff] [review]
Properly parse jar: URLs from add-ons
low risk enough to land in aurora & will help developers.Approving on aurora
Attachment #772013 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 15•12 years ago
|
||
Updated•12 years ago
|
status-firefox25:
--- → fixed
Updated•12 years ago
|
Attachment #772013 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 16•12 years ago
|
||
Comment on attachment 772013 [details] [diff] [review]
Properly parse jar: URLs from add-ons
nsIURI in general does not make any garantees about the host/hostPort getters succeeding, so it's not just JAR URIs that can cause this to throw. E.g. data: URIs (nsSimpleURI) will have similar behavior.
A more robust check would be to check instanceof nsIStandardURL, rather than checking "scheme".
Assignee | ||
Comment 17•12 years ago
|
||
Assignee | ||
Comment 18•12 years ago
|
||
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #16)
> nsIURI in general does not make any garantees about the host/hostPort
> getters succeeding, so it's not just JAR URIs that can cause this to throw.
> E.g. data: URIs (nsSimpleURI) will have similar behavior.
>
> A more robust check would be to check instanceof nsIStandardURL, rather than
> checking "scheme".
Good point, filed bug 892368 for this.
Comment 19•12 years ago
|
||
How can I get the add-on scrips displayed in the debugger? I don't get them with the steps in comment 0, so I suppose there are details missing there.
Tried on Firefox 23 beta 9: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0.
Flags: needinfo?(past)
Reporter | ||
Comment 20•12 years ago
|
||
I think the issue you are facing is that there are two bootstrap.js files, i.e. you have two restartless addons, and thus the browser debugger only shows one due to bug 890269 .
Assignee | ||
Comment 21•12 years ago
|
||
Which add-on did you install Ioana? The one mentioned in comment 0 or another one? This one (Location Bar Enhancer) appears fine for me. Look for a pref.js or a helper.js file.
Flags: needinfo?(past)
Comment 22•12 years ago
|
||
(In reply to Panos Astithas [:past] from comment #21)
> Which add-on did you install Ioana? The one mentioned in comment 0 or
> another one? This one (Location Bar Enhancer) appears fine for me. Look for
> a pref.js or a helper.js file.
That's the one I installed (the only add-on I have on this profile) and I see no scripts. Am I missing something in the steps? This is what I do:
1. Launch Firefox.
2. Install the Location Bar Enhancer add-on.
3. Press Ctrl+Shift+S.
Assignee | ||
Comment 23•12 years ago
|
||
(In reply to Ioana Budnar, QA [:ioana] from comment #22)
> 3. Press Ctrl+Shift+S.
That starts the content debugger. You need to launch the Browser Debugger from the Web Developer menu. Check the Enable Remote Debugging and Enable Chrome Debugging options first in the toolbox options panel.
Comment 24•12 years ago
|
||
Thanks for the help, guys :) I did reproduce the issue on Firefox 22 and verified it on 23:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0 (20130725195523)
bootstrap.js, helper.js and pref.js appear in the Firefox 23 debugger.
QA Contact: ioana.budnar
Comment 25•12 years ago
|
||
Verified as fixed on Firefox 24 and 25:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Status: RESOLVED → VERIFIED
Keywords: verifyme
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•