Closed Bug 1451115 Opened 8 years ago Closed 8 years ago

UpdateZoomUI throws unnecessary exception if window.gBrowser is not set

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 61
Tracking Status
firefox61 --- fixed

People

(Reporter: bradwerth, Assigned: bradwerth)

Details

Attachments

(2 files)

Sometimes devtools tests are failing with callstacks that indicate an exception being thrown in UpdateZoomUI(). One example: https://treeherder.mozilla.org/logviewer.html#?job_id=168039651&repo=mozilla-inbound&lineNumber=9603 Based on the function logic, this exception can be avoided. If thrown, the exception tends to mask root causes. In order to generate better callstacks in such cases, the logic should be reworked to remove the possibility of throwing an exception.
Attachment #8964688 - Flags: review?(dietrich)
Attachment #8964692 - Flags: review?(dtownsend)
Comment on attachment 8964688 [details] Bug 1451115 Part 1: Make UpdateZoomUI not throw an exception if gBrowser is not set on window. https://reviewboard.mozilla.org/r/233380/#review238976
Attachment #8964688 - Flags: review+
Comment on attachment 8964692 [details] Bug 1451115 Part 2: Update ZoomManager.getZoomForBrowser() to survive being passed a browser without a zoom level set. https://reviewboard.mozilla.org/r/233386/#review238978
Attachment #8964692 - Flags: review?(dtownsend) → review+
Attachment #8964688 - Flags: review?(dietrich)
Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ad673f1dd375 Part 1: Make UpdateZoomUI not throw an exception if gBrowser is not set on window. r=mossop https://hg.mozilla.org/integration/autoland/rev/6ca7168ee904 Part 2: Update ZoomManager.getZoomForBrowser() to survive being passed a browser without a zoom level set. r=mossop
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: