Closed Bug 1806723 Opened 2 years ago Closed 2 years ago

Replace Cu.reportError calls in dom/console/ConsoleAPIStorage.jsm

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

I originally tried doing this in bug 1806500, but dom/console/tests/test_bug659625.html failed on android.

Tracking it down, I found that GeckoViewConsole.jsm is not properly handling console messages with no arguments, e.g. console.trace(). As a result, it throws, which ConsoleAPIStorage catches.

With the new version, it logs it to the console (rather than via Cu.reportError), which the test picks up as an unexpected message, and hence the test fails.

This handles a call to console.trace() with no arguments, which is what happens in dom/console/tests/test_bug659625.html.
The failure is currently hidden from the test because it only checks the console log, not the output of Cu.reportError.

Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a8b626abdc06 Fix GeckoViewConsole to handle console calls with no arguments. r=geckoview-reviewers,calu https://hg.mozilla.org/integration/autoland/rev/0fe58dc368a7 Replace Cu.reportError with console.error in dom/console code. r=smaug
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: