Closed Bug 1804100 Opened 2 years ago Closed 2 years ago

Error when UrlbarTokenizer logs the query context

Categories

(Firefox :: Address Bar, defect, P3)

defect

Tracking

()

VERIFIED FIXED
109 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox107 --- unaffected
firefox108 --- wontfix
firefox109 --- verified
firefox110 --- verified

People

(Reporter: adw, Assigned: adw)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When urlbar logging is enabled, the message logged here fails and the logger logs this internal error:

Exception trying to format object for log message: TypeError: cyclic object value(resource://gre/modules/Log.sys.mjs:640:19) JS Stack trace: format@sys.mjs:640:19
formatText@sys.mjs:569:44
format@sys.mjs:587:12
append@sys.mjs:719:31
log@sys.mjs:377:16
getLoggerWithMessagePrefix/proxy.log@sys.mjs:506:18
info@sys.mjs:391:10
tokenize@sys.mjs:241:17
startQuery@sys.mjs:231:26
startQuery@sys.mjs:133:24
startQuery@sys.mjs:1487:52
autoOpen@sys.mjs:496:20
_on_mousedown@sys.mjs:3193:21
handleEvent@sys.mjs:500:23

STR:

  1. Set browser.urlbar.loglevel to Info
  2. Click in the urlbar and start typing

This might have been regressed by adding the view to the query context in bug 1800810. I didn't verify.

Set release status flags based on info from the regressing bug 1800810

This logs the search string instead of the whole query context. It uses
JSON.stringify(searchString) instead of searchString by itself so that the
string is enclosed in double quotes, which looks nicer and is easier to
understand when the string is empty. i.e., this:

Tokenizing search string: ""

Instead of this:

Tokenizing search string: 

It will also escape any atypical whitespace and nonprintable characters, but
that shouldn't happen very often.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/21e1af0c367d Fix an error when UrlbarTokenizer logs the query context. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
QA Whiteboard: [qa-109b-p2]

Reproducible with a 2022-12-05 Nightly build on macOS 12.
Verified as fixed on Firefox 109.0b5(build ID: 20221220185745) and Nightly 110.0a1(build ID: 20221222094520) on macOS 12, Windows 10, Ubuntu 22.

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

Attachment

General

Created:
Updated:
Size: