Closed
Bug 587615
Opened 14 years ago
Closed 14 years ago
lastTimestamp reset problems in WebConsole
Categories
(DevTools :: General, defect, P2)
DevTools
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: msucan, Assigned: msucan)
References
Details
(Whiteboard: [patchclean:1119])
Attachments
(1 file, 2 obsolete files)
3.69 KB,
patch
|
beltzner
:
approval2.0+
|
Details | Diff | Splinter Review |
In JSTerm.clearOutput() and HUDService.clearDisplay() we have: outputNode.lastTimestamp = 0; While in other places of the code hudBox.lastTimestamp is used. The appendGroupIfNecessary method uses hudBox.lastTimestamp, not outputNode.lastTimestamp. From the perspective of the user, I am not aware of a bug that is caused by this error in the code. However, I believe this is a bug that will catch us some day.
Assignee | ||
Comment 1•14 years ago
|
||
Proposed fix and test code. Asking Patrick for feedback - as far as I know he worked once with the code that does output grouping. Thanks!
Assignee | ||
Updated•14 years ago
|
Whiteboard: [patchclean:0919]
Comment 2•14 years ago
|
||
Comment on attachment 476648 [details] [diff] [review] proposed fix and test code >diff --git a/toolkit/components/console/hudservice/HUDService.jsm b/toolkit/components/console/hudservice/HUDService.jsm >--- a/toolkit/components/console/hudservice/HUDService.jsm >+++ b/toolkit/components/console/hudservice/HUDService.jsm >@@ -4075,17 +4075,21 @@ JSTerm.prototype = { > clearOutput: function JST_clearOutput() > { > let outputNode = this.outputNode; > > while (outputNode.firstChild) { > outputNode.removeChild(outputNode.firstChild); > } > >- outputNode.lastTimestamp = 0; >+ let hudBox = outputNode; >+ while (hudBox && hudBox.getAttribute("class") != "hud-box") { >+ hudBox = hudBox.parentNode; >+ } >+ hudBox.lastTimestamp = 0; I'd remove the "hudBox &&" from the conditional - if the output node isn't in a HUD box we're screwed, and the "hudBox.lastTimestamp = 0" statement following will fail anyway. Also I think 'hudBox.classList.contains("hud-box")' would be more future-proof. Otherwise, looks good - my bad for screwing that up!
Attachment #476648 -
Flags: feedback?(pwalton) → feedback+
Assignee | ||
Comment 3•14 years ago
|
||
Thanks Patrick for your feedback+! I updated the patch based on your suggestions. Asking for review from Shawn now.
Attachment #476648 -
Attachment is obsolete: true
Attachment #479513 -
Flags: review?(sdwilsh)
Assignee | ||
Updated•14 years ago
|
Whiteboard: [patchclean:0919] → [patchclean:0929]
Updated•14 years ago
|
Blocks: devtools4b8
Updated•14 years ago
|
No longer blocks: devtools4b8
Comment 4•14 years ago
|
||
Comment on attachment 479513 [details] [diff] [review] updated patch r=sdwilsh assuming you'll update the test to the new-world awesomeness
Attachment #479513 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Comment 5•14 years ago
|
||
Rebased patch. Thanks Shawn for the review+! Asking for approval2.0+: this patch fixes an error in the code which prevents it from properly determining the timestamp of the last message, for the purpose of appending a group when needed.
Attachment #479513 -
Attachment is obsolete: true
Attachment #491802 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Whiteboard: [patchclean:0929] → [patchclean:1119]
Comment 7•14 years ago
|
||
Comment on attachment 491802 [details] [diff] [review] rebased patch a=beltzner
Attachment #491802 -
Flags: approval2.0? → approval2.0+
Updated•14 years ago
|
Whiteboard: [patchclean:1119] → [patchclean:1119][checkin]
Assignee | ||
Comment 8•14 years ago
|
||
Thanks Mike for the a+! Patch checked in: http://hg.mozilla.org/mozilla-central/rev/ad189229497f
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [patchclean:1119][checkin] → [patchclean:1119]
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•