Closed Bug 1687485 Opened 4 years ago Closed 4 years ago

The error count button shows wrong number of errors

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(firefox86 fixed)

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: Honza, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

The error count button is sometimes not synced with the actual amount of errors on the page.

STRs:

  1. Load http://janodvarko.cz/tests/fission/case10/index.html
  2. Open DevTools (I have Network the default, might be important that it isn't the Console panel)
  3. Reload the page (F5), the error count button should show 2 (try several times)
  4. Close and open DevTools (hit F12 twice)
  5. Reload the page, the error count button value is increased every time you reload the page (no reset)

Honza

Indeed we don't clear the error count on navigation from the toolbox.
If the console is enabled, we benefit from the fact that we hooked the "message clear" action to the update of the error count.
But if the another panel is displayed, we don't trigger that code and the counter keeps growing.

For simplicity's sake, I think that we should always clear the error count when navigating

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

We used to not do anything on navigation for the error count
at the toolbox level, but the test we had to check that the
count was reset on navigation was working; this is because
there's a hook in the console panel to clear the error count
when the console is cleared, and in the test, the console panel
was selected.
This patch fixes that and adds a new test that run some assertion
on reload, without ever enabling the console panel.
Since some assertions seem redundant with the test we already had,
we remove them from the old test.

Severity: -- → S3
Priority: -- → P2
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fcd0df2433d2 [devtools] Fix error count on navigation when console isn't enabled. r=ladybenko.
Regressions: 1688067
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: