Open Bug 1543239 Opened 7 years ago Updated 3 years ago

Print simulation button should be initialized directly in the CssRuleView's constructor

Categories

(DevTools :: Inspector: Rules, defect, P3)

65 Branch
defect

Tracking

(Not tracked)

People

(Reporter: mtigley, Unassigned)

Details

Instead of initializing this.printSimulationButton in _initPrintSimulation (https://searchfox.org/mozilla-central/source/devtools/client/inspector/rules/rules.js#353), we should do this directly in the constructor at: https://searchfox.org/mozilla-central/source/devtools/client/inspector/rules/rules.js#131

The reasoning for this is because there are cases where this.printSimulationButton isn't initialized even after retrieving the emulation front due to backward-compatibility. As a result, we can get errors like this:

console.error: “Panel inspector:” (new TypeError(“this.printSimulationButton is undefined”, “resource://devtools/client/inspector/rules/rules.js”, 757))
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.