Closed Bug 1490497 Opened 3 years ago Closed 3 years ago
Unicode Url failed to get a Unicode URL ..." warning-spam (from dump()) for every console .log() executed in Dev Tools console
Bug 1490497 - Drops the dump warning statements in the unicode-url.js because sometimes they produce unnecessary dumps. r?nchevobbe
46 bytes, text/x-phabricator-request
|Details | Review|
Same STR as bug 1490489. But this bug is about *the fact that we're logging* (and doing so once per line of output), whereas bug 1490489 is about the logging itself having some typos. STR: 0. Start Firefox from the terminal. 1. Set pref browser.dom.window.dump.enabled = true 2. Open a new tab. 3. Open DevTools console (F12 or Ctrl Shift K) 4. Type into console: console.log(1);console.log(2); ...and hit enter. 5. Look at your terminal. ACTUAL RESULTS: Your terminal contains this output: ======= Warning: getUnicodeUrl failed to get a Unicode URL fromdebugger eval code, reason: TypeError: debugger eval code is not a valid URL.Warning: getUnicodeUrl failed to get a Unicode URL fromdebugger eval code, reason: TypeError: debugger eval code is not a valid URL. ======= If you have a lot of console.log(...) statements back to back, you'll get as many of these warnings as there were statements. EXPECTED RESULTS: No such warning cluttering up my terminal output. We should be able to service console.log() statements from the DevTools Console ("debugger eval code") without spamming extra output to the terminal. (This is particularly problematic in debug builds, where "dump()" is enabled by default.)
This is done here https://searchfox.org/mozilla-central/rev/de7676288a78b70d2b9927c79493adbf294faad5/devtools/client/shared/unicode-url.js#108-109 and we can probably silently fail instead.
I wonder which would be a better solution to resolve this bug together with bug 1490489 ? Simply dropping the dump as an one-off fix to both the two bugs, or specially filtering output from debugger evaluator from calling getUnicodeUrl? What's your opinion, Nicolas?
Assignee: nobody → zjz
Status: NEW → ASSIGNED
I feel like we could get rid of the dump statement. Unless you think it brings any value ?
Comment on attachment 9008338 [details] Bug 1490497 - Drops the dump warning statements in the unicode-url.js because sometimes they produce unnecessary dumps. r?nchevobbe Nicolas Chevobbe [:nchevobbe] has approved the revision.
Attachment #9008338 - Flags: review+
Here's a TRY push with the patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=945f10257f3324c868d4063d1d3943ac69710fbc
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/4e01560aa7d1 Drops the dump warning statements in the unicode-url.js because sometimes they produce unnecessary dumps. r=nchevobbe
Component: General → Shared Components
Priority: -- → P1
You need to log in before you can comment on or make changes to this bug.