Closed Bug 1628626 Opened 4 years ago Closed 4 years ago

Can't clear messages in Browser Console/Browser Toolbox if target was destroyed

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(Fission Milestone:M6, firefox77 verified)

VERIFIED FIXED
Firefox 77
Fission Milestone M6
Tracking Status
firefox77 --- verified

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

(Whiteboard: dt-fission-m2-mvp)

Attachments

(1 file)

Steps to reproduce

  1. In firefox, navigate to https://nchevobbe.github.io/demo/console-test-app.html
  2. Click on the console.log button to log some messages
  3. Open the browser console
  4. Close the https://nchevobbe.github.io/demo/console-test-app.html tab
  5. In the browser console, try to clear the output

Expected results

The output gets cleared

Actual results

The output isn't cleared, and we get the following message:

Error: Can not send request 'release' because front 'obj' is already destroyed.


Closing the tab is probably destroying the target, which means we release all the related fronts and actors. But then, when clearing the output, we'll try to release the fronts for the rendered objects, which may already be destroyed.

With the new architecture, it might happen that a message (and the ObjectFronts
it holds), are still displayed in the Browser Console / Browser Toolbox Console,
even if the target of those object fronts was destroyed.
In such case, when the user would legimitely try to clear the console, we'd try
to release the fronts that were already destroyed, which would throw an exception
and leave the console in a bad state.
This patch simply check that the fronts are still alive when we try to release
them, and adds a test (that was failing without that patch, with fission ON) for
the Browser Console.

Tracking Fission DevTools bugs for Fission Nightly (M6) milestone

Fission Milestone: --- → M6
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6b974e1bf99a
Fix issue when clearing output with messages from destroyed targets. r=jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 77
QA Whiteboard: [qa-77b-p2]

Reproduced the issue using Firefox 77.0a1 (20200409131623) on Windows 10x64.
The issue is verified fixed with Firefox 77.0.1 (20200602222727) and 78.0.1 (20200630195452) on Windows 10x64.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-77b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: