Closed
Bug 1803980
Opened 2 years ago
Closed 2 years ago
UrlbarValueFormatter generates confusing console logs in tests when resizing window
Categories
(Firefox :: Address Bar, defect)
Firefox
Address Bar
Tracking
()
RESOLVED
FIXED
109 Branch
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: aminomancer, Assigned: aminomancer)
Details
Attachments
(1 file)
See here for a frequent example.
The code path for this issue goes like this:
- The browser test resizes the window, which apparently can happen while the urlbar input is valueless
- Resizing invokes UrlbarValueFormatter's resize handler
- This calls _ensureFormattedHostVisible with no metadata argument after 100ms,
- which calls _getUrlMetaData,
- which calls Services.uriFixup.getFixupURIInfo (passing the input value, which is undefined at this point),
- which explicitly throws if no url is passed.
- Although the exception is technically handled by the trycatch block in _getUrlMetaData, that apparently doesn't prevent it from being logged (I'm assuming but don't actually know if that's expected behavior in general).
Idk exactly why the input value is undefined — looking at the context of the test, it seems like at every point when the window is resized the urlbar input value should be about:firefoxview
. But clearly I'm missing something. I thought maybe it was the cleanup function, which does call resizeTo on the window after the Firefox View tab is closed up. But that should happen after the whole test file is finished, which doesn't match with the test logs I've been seeing.
In any case, I think there's a pretty simple fix here to just return before calling Services.uriFixup.getFixupURIInfo
if the url is null.
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Assignee: nobody → shughes
Status: NEW → ASSIGNED
Pushed by shughes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb9ac51ccbe5
Fix urlbar window resize error logs. r=adw
Comment 3•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox109:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•