WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate Topic is solved

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate

Unread post by Lunokhod » 2018-01-16, 14:42

Running palemoon-27.7.0a2_180108.linux-i686.tar.bz2 from the command line I noticed a warning had been triggered after I had closed PM, it looks like some regular 'this language feature has been updated and you should probably fix it in the next few years' sort of thing but I thought it might be helpful to pass on. ;)

Code: Select all

$ palemoon
[1516110322907] ABP timeline: Adblock Plus startup                                                            	 (first event)
[1516110322910] ABP timeline: * Done registering public API                                                   	 (3)
[1516110322972] ABP timeline: * Entered filter listener initialization()                                      	 (62)
[1516110322972] ABP timeline: * * Entered ElemHide.init()                                                     	 (0)
[1516110322973] ABP timeline: * * * done adding prefs listener                                                	 (1)
[1516110322998] ABP timeline: * * * done determining stylesheet URL                                           	 (25)
[1516110322999] ABP timeline: * * ElemHide.init() done                                                        	 (1)
[1516110323000] ABP timeline: * * Entered FilterStorage.loadFromDisk()                                        	 (1)
[1516110323003] ABP timeline: * * * FilterStorage.loadFromDisk() -> readFile()                                	 (3)
[1516110323007] ABP timeline: * * * FilterStorage.loadFromDisk() <- readFile() (async action pending)         	 (4)
[1516110323007] ABP timeline: * * FilterStorage.loadFromDisk() done                                           	 (0)
[1516110323007] ABP timeline: * * done initializing data structures                                           	 (0)
[1516110323008] ABP timeline: * * done adding observers                                                       	 (1)
[1516110323008] ABP timeline: * Filter listener initialization done                                           	 (0)
[1516110323009] ABP timeline: * Done loading filter listener                                                  	 (1)
[1516110323020] ABP timeline: * Entered content policy initialization                                         	 (11)
[1516110323029] ABP timeline: * * done initializing types                                                     	 (9)
[1516110323035] ABP timeline: * * registering global stylesheet                                               	 (6)
[1516110323040] ABP timeline: * * done registering stylesheet                                                 	 (5)
[1516110323044] ABP timeline: * Done initializing content policy                                              	 (4)
[1516110323047] ABP timeline: * Done loading content policy                                                   	 (3)
[1516110323059] ABP timeline: * Entered Synchronizer.init()                                                   	 (12)
[1516110323060] ABP timeline: * Synchronizer.init() done                                                      	 (1)
[1516110323061] ABP timeline: * Done loading subscription synchronizer                                        	 (1)
[1516110323065] ABP timeline: * Entered Notification.init()                                                   	 (4)
[1516110323066] ABP timeline: * Notification.init() done                                                      	 (1)
[1516110323067] ABP timeline: * Done loading notification downloader                                          	 (1)
[1516110323116] ABP timeline: * Done loading UI integration code                                              	 (49)
[1516110323116] ABP timeline: Started up                                                                      	 (0)
ABP timeline: Total time elapsed: 209
ABP timeline: Warning: Processing reentered for async action FilterStorageRead
ABP timeline: Warning: Processing reentered for async action FilterStorageRead
[1516110338858] ABP timeline: Async action FilterStorageRead done                                             	 (2/15851)
[1516110338859] ABP timeline: FilterStorage.loadFromDisk() read callback                                      	 (first event)
[1516110338860] ABP timeline: * Initializing data done, triggering observers                                  	 (1)
[1516110341143] ABP timeline: * Entered ElemHide.apply()                                                      	 (2283)
[1516110341146] ABP timeline: * * start grouping selectors                                                    	 (3)
[1516110341731] ABP timeline: * * done grouping selectors                                                     	 (585)
[1516110341740] ABP timeline: * ElemHide.apply() done (async action pending)                                  	 (9)
[1516110341774] ABP timeline: FilterStorage.loadFromDisk() read callback done                                 	 (34)
ABP timeline: Total time elapsed: 2916
ABP timeline: Warning: Processing not entered for async action FilterStorageRead
ABP timeline: Warning: Processing not entered for async action FilterStorageRead
[1516110343565] ABP timeline: Async action ElemHideWrite done                                                 	 (1182/1825)
[1516110343565] ABP timeline: ElemHide.apply() write callback                                                 	 (first event)
[1516110343566] ABP timeline: * ElemHide.unapply() finished                                                   	 (1)
[1516110344119] ABP timeline: * Applying stylesheet finished                                                  	 (553)
[1516110344120] ABP timeline: ElemHide.apply() write callback done                                            	 (1)
ABP timeline: Total time elapsed: 556
[1516110683333] ABP timeline: Entered FilterStorage.saveToDisk()                                              	 (first event)
[1516110683337] ABP timeline: * FilterStorage.saveToDisk() -> writeFilters()                                  	 (4)
[1516110683559] ABP timeline: * FilterStorage.saveToDisk() -> writeFilters() (async action pending)           	 (222)
[1516110683559] ABP timeline: FilterStorage.saveToDisk() done                                                 	 (0)
ABP timeline: Total time elapsed: 226
[1516110688634] ABP timeline: Async action FilterStorageWrite done                                            	 (1607/5075)
[1516110688635] ABP timeline: FilterStorage.saveToDisk() write callback                                       	 (first event)
[1516110688636] ABP timeline: FilterStorage.saveToDisk() write callback done                                  	 (1)
ABP timeline: Total time elapsed: 1
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
PCH_bookmarkPage@chrome://browser/content/browser.js:2322:23
PCH_bookmarkCurrentPage@chrome://browser/content/browser.js:2357:5
oncommand@chrome://browser/content/browser.xul:1:1
Wait, it's all Ohio? Always has been...

New Tobin Paradigm

Re: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate

Unread post by New Tobin Paradigm » 2018-01-16, 14:51

Yeah this is related to the way Mozilla changes things.. Pale Moon as an application does things in an older way that predates the change in the platform. Of course that change is related to e10s bs which we don't use.. As near as I can figure.. If we don't change that then when we run in e10s it won't work LOL.. Well we aren't Mozilla and we aren't gonna do e10s..

So ignore it. Not relevant.

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate

Unread post by adesh » 2018-01-16, 15:50

This appears only when opening a private window. I also did encounter this stupid warning many times and thought of reporting a few months ago. But knowing about http://xref.palemoon.org/ service, I decided to check it myself first. I was relieved when I found it was related to e10s crap which doesn't affect Pale Moon. Since then I've been ignoring these warnings.


User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate

Unread post by Lunokhod » 2018-01-16, 19:35

OK, thanks for the explanation. Although interestingly when I quickly approximately recreated what I did earlier today from the history and memory I did not get the warning again. I used normal tabs in one window, visited sites I had used before, which were mainly text, no video or audio. I didn't open a private browsing window. So then I opened the Pale Moon forums in a private browsing window (a feature I never normally use), closed that, closed all the tabs and still didn't get the warning again.
There is the possibility of user error I suppose, perhaps hitting CTRL instead of SHIFT at some point without noticing. But I don't know exactly what triggered it. Probably irrelevant though from your description. :coffee:
Wait, it's all Ohio? Always has been...

GMforker

Re: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate

Unread post by GMforker » 2018-01-16, 20:08

vingtzwanzig wrote:...I did not get the warning again
An example - steps to reproduce:
[Windows] The command line: "palemoon.exe -console" (a similar alternative is for Linux - launch in the terminal)
Go to "about:privatebrowsing"

See also:
bug #1124129
bug #1069059

New Tobin Paradigm

Re: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate

Unread post by New Tobin Paradigm » 2018-01-16, 20:18

This is irrelevant GMForker. No one cares about this warning because it has no effect on anything UNLESS we wanted to be compatible with e10s.. We don't..

Read the thread NOT skim it before you post.

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate

Unread post by Lunokhod » 2018-01-16, 20:30

Well in the time gap between the above posts I did follow the suggestion to reproduce the warning, but it came up slightly different, the first 2 warnings appeared when I went to the about:privatebrowsing page then the next 2 appeared when I clicked the Open a Private Window button.
So my bug was a new irrelevant bug that finds another way to reference the unused e10s. :)
And now I see what you are talking about with e10s - e(10 letters)s - https://wiki.mozilla.org/Electrolysis, so I guess at least I learned something new today.

Code: Select all

$ palemoon
[1516129758277] ABP timeline: Adblock Plus startup                                                            	 (first event)
[1516129758280] ABP timeline: * Done registering public API                                                   	 (3)
[1516129758389] ABP timeline: * Entered filter listener initialization()                                      	 (109)
[1516129758389] ABP timeline: * * Entered ElemHide.init()                                                     	 (0)
[1516129758390] ABP timeline: * * * done adding prefs listener                                                	 (1)
[1516129758396] ABP timeline: * * * done determining stylesheet URL                                           	 (6)
[1516129758396] ABP timeline: * * ElemHide.init() done                                                        	 (0)
[1516129758396] ABP timeline: * * Entered FilterStorage.loadFromDisk()                                        	 (0)
[1516129758398] ABP timeline: * * * FilterStorage.loadFromDisk() -> readFile()                                	 (2)
[1516129758406] ABP timeline: * * * FilterStorage.loadFromDisk() <- readFile() (async action pending)         	 (8)
[1516129758406] ABP timeline: * * FilterStorage.loadFromDisk() done                                           	 (0)
[1516129758406] ABP timeline: * * done initializing data structures                                           	 (0)
[1516129758407] ABP timeline: * * done adding observers                                                       	 (1)
[1516129758407] ABP timeline: * Filter listener initialization done                                           	 (0)
[1516129758407] ABP timeline: * Done loading filter listener                                                  	 (0)
[1516129758431] ABP timeline: * Entered content policy initialization                                         	 (24)
[1516129758436] ABP timeline: * * done initializing types                                                     	 (5)
[1516129758440] ABP timeline: * * registering global stylesheet                                               	 (4)
[1516129758444] ABP timeline: * * done registering stylesheet                                                 	 (4)
[1516129758447] ABP timeline: * Done initializing content policy                                              	 (3)
[1516129758450] ABP timeline: * Done loading content policy                                                   	 (3)
[1516129758464] ABP timeline: * Entered Synchronizer.init()                                                   	 (14)
[1516129758465] ABP timeline: * Synchronizer.init() done                                                      	 (1)
[1516129758468] ABP timeline: * Done loading subscription synchronizer                                        	 (3)
[1516129758470] ABP timeline: * Entered Notification.init()                                                   	 (2)
[1516129758471] ABP timeline: * Notification.init() done                                                      	 (1)
[1516129758475] ABP timeline: * Done loading notification downloader                                          	 (4)
[1516129758522] ABP timeline: * Done loading UI integration code                                              	 (47)
[1516129758522] ABP timeline: Started up                                                                      	 (0)
ABP timeline: Total time elapsed: 245
ABP timeline: Warning: Processing reentered for async action FilterStorageRead
ABP timeline: Warning: Processing reentered for async action FilterStorageRead
[1516129773771] ABP timeline: Async action FilterStorageRead done                                             	 (1/15365)
[1516129773772] ABP timeline: FilterStorage.loadFromDisk() read callback                                      	 (first event)
[1516129773773] ABP timeline: * Initializing data done, triggering observers                                  	 (1)
[1516129776351] ABP timeline: * Entered ElemHide.apply()                                                      	 (2578)
[1516129776353] ABP timeline: * * start grouping selectors                                                    	 (2)
[1516129777134] ABP timeline: * * done grouping selectors                                                     	 (781)
[1516129777142] ABP timeline: * ElemHide.apply() done (async action pending)                                  	 (8)
[1516129777210] ABP timeline: FilterStorage.loadFromDisk() read callback done                                 	 (68)
ABP timeline: Total time elapsed: 3439
ABP timeline: Warning: Processing not entered for async action FilterStorageRead
ABP timeline: Warning: Processing not entered for async action FilterStorageRead
[1516129779443] ABP timeline: Async action ElemHideWrite done                                                 	 (1368/2301)
[1516129779444] ABP timeline: ElemHide.apply() write callback                                                 	 (first event)
[1516129779444] ABP timeline: * ElemHide.unapply() finished                                                   	 (0)
[1516129780196] ABP timeline: * Applying stylesheet finished                                                  	 (752)
[1516129780197] ABP timeline: ElemHide.apply() write callback done                                            	 (1)
ABP timeline: Total time elapsed: 754
[1516130118472] ABP timeline: Entered FilterStorage.saveToDisk()                                              	 (first event)
[1516130118475] ABP timeline: * FilterStorage.saveToDisk() -> removeLastBackup()                              	 (3)
[1516130118521] ABP timeline: * * FilterStorage.saveToDisk() -> renameBackup()                                	 (46)
[1516130118525] ABP timeline: * * * FilterStorage.saveToDisk() -> renameBackup()                              	 (4)
[1516130118531] ABP timeline: * * * * FilterStorage.saveToDisk() -> renameBackup()                            	 (6)
[1516130118539] ABP timeline: * * * * * FilterStorage.saveToDisk() -> renameBackup()                          	 (8)
[1516130118542] ABP timeline: * * * * * * FilterStorage.saveToDisk() -> renameBackup()                        	 (3)
[1516130118548] ABP timeline: * * * * * * FilterStorage.saveToDisk() <- renameBackup()                        	 (6)
[1516130118548] ABP timeline: * * * * * FilterStorage.saveToDisk() <- renameBackup()                          	 (0)
[1516130118548] ABP timeline: * * * * FilterStorage.saveToDisk() <- renameBackup()                            	 (0)
[1516130118548] ABP timeline: * * * FilterStorage.saveToDisk() <- renameBackup()                              	 (0)
[1516130118548] ABP timeline: * * FilterStorage.saveToDisk() <- renameBackup()                                	 (0)
[1516130118548] ABP timeline: * FilterStorage.saveToDisk() <- removeLastBackup()                              	 (0)
[1516130118548] ABP timeline: FilterStorage.saveToDisk() done                                                 	 (0)
ABP timeline: Total time elapsed: 77
[1516130118612] ABP timeline: FilterStorage.saveToDisk() -> writeFilters()                                    	 (first event)
[1516130118952] ABP timeline: FilterStorage.saveToDisk() -> writeFilters() (async action pending)             	 (340)
ABP timeline: Total time elapsed: 343
[1516130121325] ABP timeline: Async action FilterStorageWrite done                                            	 (1715/2370)
[1516130121327] ABP timeline: FilterStorage.saveToDisk() write callback                                       	 (first event)
[1516130121328] ABP timeline: FilterStorage.saveToDisk() write callback done                                  	 (1)
ABP timeline: Total time elapsed: 1
[1516133718550] ABP timeline: Entered FilterStorage.saveToDisk()                                              	 (first event)
[1516133718554] ABP timeline: * FilterStorage.saveToDisk() -> writeFilters()                                  	 (4)
[1516133718984] ABP timeline: * FilterStorage.saveToDisk() -> writeFilters() (async action pending)           	 (430)
ABP timeline: Warning: Async action FilterStorageWrite already executing
[1516133718985] ABP timeline: FilterStorage.saveToDisk() done                                                 	 (1)
ABP timeline: Total time elapsed: 435
[1516133721555] ABP timeline: Async action FilterStorageWrite done                                            	 (2003/2570)
[1516133721556] ABP timeline: FilterStorage.saveToDisk() write callback                                       	 (first event)
[1516133721557] ABP timeline: FilterStorage.saveToDisk() write callback done                                  	 (1)
ABP timeline: Total time elapsed: 1
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
@about:privatebrowsing:40:12
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
@about:privatebrowsing:68:14
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
@about:privatebrowsing:40:12
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
@about:privatebrowsing:68:14

Last edited by Lunokhod on 2018-01-16, 20:50, edited 1 time in total.
Wait, it's all Ohio? Always has been...

GMforker

Re: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate

Unread post by GMforker » 2018-01-16, 20:35

New Tobin Paradigm wrote:This is irrelevant.
That's your opinion.
New Tobin Paradigm wrote:Read the thread NOT skim it before you post.
I read it. I wrote it anyway.

New Tobin Paradigm

Re: WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate

Unread post by New Tobin Paradigm » 2018-01-16, 21:06

GMforker wrote:
New Tobin Paradigm wrote:This is irrelevant.
That's your opinion.
Let's test that.

Code: Select all

   // Rather than passing content windows to this function, please use
   // isBrowserPrivate since it works with e10s.
   isWindowPrivate: function pbu_isWindowPrivate(aWindow) {
     if (!(aWindow instanceof Components.interfaces.nsIDOMChromeWindow)) {
       dump("WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. " +
            "Use isContentWindowPrivate instead (but only for frame scripts).\n"
            + new Error().stack);
     }
But perhaps I am wrong...
// Rather than passing content windows to this function, please use
// isBrowserPrivate since it works with e10s.
Hmm.. Odd.. Seems I was right but let's look a little closer...
use isBrowserPrivate since it works with e10s
Ok.. It wants people to use isBrowserPrivate and not isWindowPrivate because e10s.. Let's cross check something...
Well shit.. Maybe it is an opinion..

Oh wait, NO IT ISN'T!
Last edited by New Tobin Paradigm on 2018-01-16, 21:10, edited 5 times in total.

Locked