Closed Bug 1572414 Opened 2 years ago Closed 2 years ago

Fix non-native ConsoleAPI console warning in multi-proxy Browser Console

Categories

(DevTools :: Console, task, P1)

task

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-fission dt-fission-m1)

Attachments

(1 file)

When Bug 1441711 lands, if you open the browser console with the fission pref, you'll see the following message in the browser console:

The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.

The message is displayed from devtools/client/webconsole/webconsole-connection-proxy.js#90-92

Whiteboard: dt-fission
Blocks: 1572435
Blocks: 1572671
No longer blocks: 1572671

When the console parent actor is a ContentProcessTargetActor, we don't have
a reference to a nsIDOMWindow, but only to a Sandbox.
The code in hasNativeConsoleAPI would then silently fail when trying to
access window.wrappedJSObject, and keep isNative as false.
For now, we work around this by always returning true if we don't have
access to a nsIDOMWindow.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: P2 → P1
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/44918721e54f
Fix hasNativeConsoleAPI when dealing with Sandboxes. r=yulia.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
Whiteboard: dt-fission → dt-fission dt-fission-m1
You need to log in before you can comment on or make changes to this bug.