Closed Bug 1079805 Opened 10 years ago Closed 9 years ago

WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate from network-monitor.js

Categories

(DevTools :: Netmonitor, defect)

defect
Not set
normal

Tracking

(e10s+)

RESOLVED DUPLICATE of bug 1121765
Tracking Status
e10s + ---

People

(Reporter: bgrins, Unassigned)

References

Details

When running via ./mach run I see this error in stdout often.  If you don't see it immediately, try opening the network monitor then reloading a page.

WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
NM__onRequestHeader@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/network-monitor.js:653:34
NM_observeActivity@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/network-monitor.js:532:7
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
Summary: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate → WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate from network-monitor.js
I still see this error on stdout all the time:

> WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
> pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
> NM__onRequestHeader@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/network-monitor.js:668:34
> NM_observeActivity@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/network-monitor.js:547:7
> makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
Blocks: dte10s
tracking-e10s: --- → ?
Victor, we can't use `PrivateBrowsingUtils.isWindowPrivate` anymore with content windows [0] as we do in network-monitor.js [1].  The recommendation now is to use `isBrowserPrivate` [2] since it works in e10s.  We need to find the browser associated with a particular channel so we can appropriately decide if it's a private request.  Any ideas how to get this info?

[0]: https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/PrivateBrowsingUtils.jsm?from=privatebrowsingutils.jsm#21
[1]: https://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/webconsole/network-monitor.js?from=network-monitor.js#668
[2]: https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/PrivateBrowsingUtils.jsm?from=privatebrowsingutils.jsm#36
Flags: needinfo?(vporof)
(In reply to Brian Grinstead [:bgrins] from comment #2)
> Victor, we can't use `PrivateBrowsingUtils.isWindowPrivate` anymore with
> content windows [0] as we do in network-monitor.js [1].  The recommendation
> now is to use `isBrowserPrivate` [2] since it works in e10s.  We need to
> find the browser associated with a particular channel so we can
> appropriately decide if it's a private request.  Any ideas how to get this
> info?
> 
> [0]:
> https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/
> PrivateBrowsingUtils.jsm?from=privatebrowsingutils.jsm#21
> [1]:
> https://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/webconsole/
> network-monitor.js?from=network-monitor.js#668
> [2]:
> https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/
> PrivateBrowsingUtils.jsm?from=privatebrowsingutils.jsm#36

A patch that appears to make the needed change is up for review in bug 1121765.

Maybe this can just depend on that one?
(In reply to J. Ryan Stinnett [:jryans] from comment #3)
> A patch that appears to make the needed change is up for review in bug
> 1121765.
> 
> Maybe this can just depend on that one?

Ah, nice!  Going to just dup this one since that should fix it outright.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(vporof)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.