Closed Bug 760868 Opened 13 years ago Closed 13 years ago

Gmail includes scripts names that make the debugger script list too long

Categories

(DevTools :: Debugger, defect, P2)

13 Branch
defect

Tracking

(firefox15 verified)

RESOLVED FIXED
Firefox 16
Tracking Status
firefox15 --- verified

People

(Reporter: dcamp, Assigned: vporof)

Details

Attachments

(1 file, 3 obsolete files)

Specifically, a long url starting with recentposts?...
Priority: -- → P2
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Attached patch v1 (obsolete) — Splinter Review
Yup...
Attachment #629747 - Flags: review?(past)
Attached patch v2 (obsolete) — Splinter Review
Well, this was fun.
Attachment #629747 - Attachment is obsolete: true
Attachment #629747 - Flags: review?(past)
Attachment #629937 - Flags: review?(past)
Attached patch v2.1 (obsolete) — Splinter Review
Minor grammar and typo fixes.
Attachment #629937 - Attachment is obsolete: true
Attachment #629937 - Flags: review?(past)
Attachment #629939 - Flags: review?(past)
Comment on attachment 629939 [details] [diff] [review] v2.1 >+const HELLIP = String.fromCharCode(8230); use intl.ellipsis
Comment on attachment 629939 [details] [diff] [review] v2.1 Review of attachment 629939 [details] [diff] [review]: ----------------------------------------------------------------- The only important issue is limiting the filename case, the rest are just nits. I'm a little concerned about the increased complexity from trimURL and to its recursive nature, but I learned to stop worrying and love the bomb^H^H^H^Hpatch. ::: browser/devtools/debugger/debugger-controller.js @@ +949,4 @@ > }, > > /** > + * Trims as much as possible from an URL, while keeping the result unique Nit: "a URL" @@ +956,5 @@ > + * The script URL. > + * @param string aLabel > + * The resulting label at each step. > + * @param number aSeq > + * The current iteration step. The last two arguments should be marked optional. @@ +963,2 @@ > */ > + _trimURL: function SS__trimURL(aUrl, aLabel, aSeq) { So, trimUrlQuery there, but trimURL here, huh? FINE. @@ +966,5 @@ > + try { > + // Use an nsIURL to parse all the url path parts. > + aUrl = Services.io.newURI(aUrl, null, null).QueryInterface(Ci.nsIURL); > + } catch (e) { > + // This doesn't look like an url, or nsIURL can't handle it. Nit: "a URL" @@ +978,5 @@ > + // base name and extension if available). > + > + // If this url contains an invalid query, unfortunately nsIURL thinks > + // it's part of the file extension. It must be removed. > + aLabel = aUrl.fileName.replace(/\&.*/, ""); I believe you should check against MAX_REF here as well. There is a pathological case in https://tbpl.mozilla.org/?tree=Mozilla-Inbound @@ +988,5 @@ > + aSeq = 1; > + } > + > + // If we have a label and it doesn't start with a query... > + if (aLabel && !aLabel.match(/^\?/)) { aLabel.indexOf('?') != 0 should be faster.
Attachment #629939 - Flags: review?(past) → review+
Attachment #629939 - Flags: feedback-
(In reply to Dão Gottwald [:dao] from comment #4) > > I believe you should check against MAX_REF here as well. There is a > pathological case in https://tbpl.mozilla.org/?tree=Mozilla-Inbound (In reply to Panos Astithas [:past] from comment #5) > Comment on attachment 629939 [details] [diff] [review] > v2.1 > > >+const HELLIP = String.fromCharCode(8230); > > use intl.ellipsis No need for those anymore, we'll use a max-width on the menulist. > > @@ +988,5 @@ > > + aSeq = 1; > > + } > > + > > + // If we have a label and it doesn't start with a query... > > + if (aLabel && !aLabel.match(/^\?/)) { > > aLabel.indexOf('?') != 0 should be faster. But.. me gusta regex.. OK :P
Attached patch v2.2Splinter Review
Addressed comments.
(In reply to Victor Porof from comment #6) > (In reply to Dão Gottwald [:dao] from comment #4) > > >+const HELLIP = String.fromCharCode(8230); > > > > use intl.ellipsis > > No need for those anymore, we'll use a max-width on the menulist. Yep, we chatted about it in IRC. I forgot to mention that in my previous comment.
Whiteboard: [land-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 16
Attachment #629939 - Attachment is obsolete: true
Comment on attachment 630153 [details] [diff] [review] v2.2 [Approval Request Comment] Bug caused by (feature/regressing bug #): New feature User impact if declined: some sites will cause the debugger toolbar to appear chopped, making the feature look unpolished Testing completed (on m-c, etc.): On m-c and fx-team Risk to taking this patch (and alternatives if risky): minimal risk, it's a tool only developers will use String or UUID changes made by this patch: none
Attachment #630153 - Flags: approval-mozilla-aurora?
Comment on attachment 630153 [details] [diff] [review] v2.2 [Triage Comment] Feature polish with no risk to the everyday Firefox user.
Attachment #630153 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Verified as fixed on: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20100101 Firefox/15.0 Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0 Ellipses are now used for the long script names.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: