Closed Bug 1124129 Opened 10 years ago Closed 10 years ago

"WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead" from aboutPrivateBrowsing.js

Categories

(Firefox :: Private Browsing, defect)

35 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 38

People

(Reporter: whimboo, Assigned: billm)

References

Details

(Keywords: regression, Whiteboard: [mozmill])

Attachments

(1 file, 1 obsolete file)

Not sure why you do not see this logging output when opening the page manually, but I do. The stack is way smaller so maybe we can find out the problem and get this fixed. Steps: 1. Start Firefox from the command line (maybe dumps have to be enabled) 2. Load "about:privatebrowsing" via the locationbar 3. Observe the warnings in the terminal Here two warnings which are spit out right after each other: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts). pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14 @chrome://browser/content/aboutPrivateBrowsing.js:12:6 WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts). pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14 @chrome://browser/content/aboutPrivateBrowsing.js:37:8 Here the appropriate code: 12 if (!PrivateBrowsingUtils.isWindowPrivate(window)) { 13 document.title = stringBundle.GetStringFromName("title.normal"); 14 setFavIcon("chrome://global/skin/icons/question-16.png"); 15 } else { [..] 36 document.addEventListener("DOMContentLoaded", function () { 37 if (!PrivateBrowsingUtils.isWindowPrivate(window)) { 38 document.body.setAttribute("class", "normal"); 39 } Regressor seems to be bug 1069059 which landed in the timeframe of Firefox 35.
Attached patch fix-pb (obsolete) — Splinter Review
Assignee: nobody → wmccloskey
Status: NEW → ASSIGNED
Attachment #8552604 - Flags: review?(ttaubert)
Comment on attachment 8552604 [details] [diff] [review] fix-pb Review of attachment 8552604 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/privatebrowsing/content/aboutPrivateBrowsing.js @@ +33,5 @@ > head.insertBefore(icon, head.firstChild); > } > > document.addEventListener("DOMContentLoaded", function () { > + if (!PrivateBrowsingUtils.isContentWindowPrivate(window)) { Doesn't it also need the change in line 12 too?
Attached patch fix-pb 2Splinter Review
Yeah, guess so.
Attachment #8552604 - Attachment is obsolete: true
Attachment #8552604 - Flags: review?(ttaubert)
Attachment #8552633 - Flags: review?(ttaubert)
Comment on attachment 8552633 [details] [diff] [review] fix-pb 2 Review of attachment 8552633 [details] [diff] [review]: ----------------------------------------------------------------- Haha, I just wrote the same patch, and Bugzilla suggested this bug when filing my bug. :-) r=me
Attachment #8552633 - Flags: review?(ttaubert) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
This was closed on January 23 2015. It's now June 27 2015 and I'm seeing WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts). pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14 nsBrowserAccess.prototype.openURI@chrome://browser/content/browser.js:15320:21 So, clearly this was not fixed.
Jaikens03, that is a different stack and would need a new bug filed. Your issue comes from browser.js while mine was from aboutPrivateBrowsing.js
2015 08 09 Linux localhost.localdomain 4.1.3-201.fc22.i686+PAE #1 SMP Wed Jul 29 20:36:37 UTC 2015 i686 i686 i386 GNU/Linux (Fedora 22) Mozilla Firefox 39.0.3 step 1,2,3 as sugegsted by Henrik Skupin: > firefox (firefox:12594): GLib-GObject-WARNING **: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used anymore. It will be removed in a future version. WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts). pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14 nsBrowserAccess.prototype.openURI@chrome://browser/content/browser.js:15418:21 is there something to be fixed?
> (In reply to mario from comment #9) mario filed bug 1192601.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: