Closed Bug 1546917 Opened 6 months ago Closed 4 months ago

print simulation throws when closing the toolbox connected to FF67 or older

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: jdescottes, Assigned: nchevobbe)

Details

Attachments

(1 file)

STRs:

this.printSimulationButton is undefined", "resource://devtools/client/inspector/rules/rules.js", 757

The destroy of the rules panel contains:

    // Clean-up for print simulation.
    if (this._emulationFront) {
      this.printSimulationButton.removeEventListener("click",
        this._onTogglePrintSimulation);

      this._emulationFront.destroy();

      this.printSimulationButton = null;
      this._emulationFront = null;
    }

But even if emulationFront is truthy, this.printSimulationButton might be null.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

Easier STR:

  1. Open the Browser Toolbox
  2. Select the Inspector tab
  3. Close the Browser Toolbox

This is because we don't show the print simulation button when inspecting non-content document (devtools/client/inspector/rules/rules.js#349 )

Even if emulationFront is truthy, printSimulationButton might
not be defined, which is causing an issue when trying to remove
the click event listener.

Attachment #9074456 - Attachment description: Bug 1546917 - Guard on printSimulationButton when removing click listener. r=mtigley. → Bug 1546917 - Don't remove event listeners and properties on rules panel destroy. r=mtigley.
Attachment #9074456 - Attachment description: Bug 1546917 - Don't remove event listeners and properties on rules panel destroy. r=mtigley. → Bug 1546917 - Create this.printSimulation in rule.js in the constructor. r=gl.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ddfd4fe0ab5
Create this.printSimulation in rule.js in the constructor. r=gl.
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
QA Whiteboard: [qa-69b-p2]
You need to log in before you can comment on or make changes to this bug.