Closed Bug 841712 Opened 8 years ago Closed 8 years ago
Copy in Error Console has some errors
This is in a current nightly: 21.0a1 (2013-02-14) STR: * open Error Console (_not_ the Web Console) * copy a line which has a line number * paste it in a text editor Expected: * we have the same informations as what is displayed Actual: * the line number is missing and sometimes some code is displayed instead For example, here is one example : Timestamp: 15/02/2013 13:40:12 Warning: TypeError: function WCF__outputMessageFromQueue does not always return a value Source File: chrome://browser/content/devtools/webconsole.js Line: return lastVisible ? node : null; , Column: 32 Source Code: return lastVisible ? node : null; See that the "line" line has the same text as in "source code", with a "column" information too (which is fine) Another example without a source code line : Timestamp: 15/02/2013 13:40:12 Warning: TypeError: function CommandController_isCommandEnabled does not always return a value Source File: chrome://browser/content/devtools/webconsole.js Line: (null) Here you see the line is "null" whereas it was displayed in the Console. This works correctly in Aurora.
I didn't want to use the "Console" component as it's not related to the Web Console but to our old beloved Error Console ;)
The Error Console has its own component in Toolkit.
Component: Developer Tools: Console → Error Console
Product: Firefox → Toolkit
Regressionn range: m-c good=2012-01-24 bad=2012-01-25 http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=98ea4d294369&tochange=a207f33adc1a Suspected bug: Jared Wein — Bug 831020 - Errors in the error console with very long reference lines hang the browser. r=neil
Assignee: nobody → jAwS
Status: NEW → ASSIGNED
Attachment #714401 - Flags: review?(neil)
Comment on attachment 714401 [details] [diff] [review] Patch Whoops, it's worse than I feared. "line" needs to be fixed in the subsequent line which is also using this.mSourceLine by mistake; this.mSourceLine actually belongs where it says this.getAttribute("code") further down! Meanwhile filterElement is now checking the source code twice :-( [Was bug 764346 supposed to filter on line?]
Attachment #714401 - Flags: review?(neil) → review-
(In reply to email@example.com from comment #5) > [Was bug 764346 supposed to filter on line?] Yes, the Web Console allows filtering on line number so the idea was to make the two filters work the same way. See https://bugzilla.mozilla.org/show_bug.cgi?id=764346#c3.
Thank you for the quick review and sorry for not catching those other issues. I fixed the issue with filterElement searching the code twice so it now searches the line number. I kept the filtering on getAttribute("code") instead of mSourceLine for two reasons: 1) "code" is what is shown to the user and so it helps to show a user why a filtered entry is appearing 2) The lines are truncated for performance reasons, so filtering on extremely long lines won't be good for perf.
Comment on attachment 714458 [details] [diff] [review] Patch v2 r=me on the toString change but the filterElement change should be reverted to the version prior to bug 831020 instead.
Attachment #714458 - Flags: review?(neil) → review+
You need to log in before you can comment on or make changes to this bug.