Per-window Private Browsing: Difference between revisions

Jump to navigation Jump to search
Line 24: Line 24:


=== DocShell ===
=== DocShell ===
Each docshell maintains a privateBrowsing boolean flag.
* Upon docshell creation:
** For chrome docshells, the flag is initialized to false.
** For content docshells, the flag is initialized to the value of the parent docshell's privateBrowsing flag.
* On getting, the docshell returns the last value set for that flag.
* On setting, the following happens:
** If the docshell is a content docshell, the set operation fails, returning NS_ERROR_FAILURE, unless the set operation is being invoked by a parent docshell.
** If the docshell is a chrome docshell, the set operation succeeds.  The docshell will look into all of its child subtree, and set the privateBrowsing flag on each element in its subtree with its own flag.


=== History ===
=== History ===
Confirmed users
657

edits

Navigation menu