Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Add per-docshell observer list for private browsing transitions

RESOLVED FIXED in mozilla15

Status

()

Core
Document Navigation
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: jdm, Assigned: jdm)

Tracking

Trunk
mozilla15
x86
Mac OS X
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

6 years ago
To ensure that a DOMStorage clears its cache if its owning window switches privacy modes, we need some kind of immediate notification.
(Assignee)

Comment 1

6 years ago
Created attachment 599226 [details] [diff] [review]
Add per-docshell privacy mode transition observers.
Attachment #599226 - Flags: review?(bzbarsky)

Comment 2

6 years ago
Comment on attachment 599226 [details] [diff] [review]
Add per-docshell privacy mode transition observers.

Why is this going on nsILoadContext and not on the docshell?

Comment 3

6 years ago
(And also, please use an observer array, so you don't have to make assumptions about the removal behavior, if any.)
(Assignee)

Comment 4

6 years ago
Only because it seemed logical to group it with the attribute.(In reply to Boris Zbarsky (:bz) from comment #2)
> Comment on attachment 599226 [details] [diff] [review]
> Add per-docshell privacy mode transition observers.
> 
> Why is this going on nsILoadContext and not on the docshell?

Only because it seemed logical to group it with the attribute.

Comment 5

6 years ago
I don't think we should do that.  If we're trying to observe on a particular window, the API should be one window or docshell, not on the load context...
(Assignee)

Comment 6

6 years ago
Created attachment 599471 [details] [diff] [review]
Add per-docshell privacy mode transition observers.
Attachment #599471 - Flags: review?(bzbarsky)
(Assignee)

Updated

6 years ago
Attachment #599226 - Attachment is obsolete: true
Attachment #599226 - Flags: review?(bzbarsky)
(Assignee)

Updated

6 years ago
Blocks: 463027
Whiteboard: [needs review]

Comment 7

6 years ago
Comment on attachment 599471 [details] [diff] [review]
Add per-docshell privacy mode transition observers.

>+++ b/docshell/base/nsDocShell.h
>+    nsTObserverArray<nsIWeakReference*> mPrivacyObservers;

I'm ... a little surprised that worked.  You're getting nsIWeakReference objects, putting this in the array, then dropping the only ref to them, which should by rights explode.

Please make this member nsTObserverArray<nsWeakPtr>.

>+++ b/docshell/base/nsIDocShell.idl

Rev the uuid.

>+++ b/docshell/base/nsIPrivacyTransitionObserver.idl
>\ No newline at end of file

Add one, please.

r=me with those issues fixed.  Please do NOT check in without fixing the ownership model bit!
Attachment #599471 - Flags: review?(bzbarsky) → review+
(Assignee)

Updated

5 years ago
Whiteboard: [needs review] → [needs updated patch]
(Assignee)

Updated

5 years ago
Blocks: 722942
(Assignee)

Comment 8

5 years ago
Created attachment 616861 [details] [diff] [review]
Add per-docshell privacy mode transition observers.
(Assignee)

Updated

5 years ago
Attachment #599471 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Assignee: nobody → josh
Whiteboard: [needs updated patch] → [needs landing]
https://hg.mozilla.org/projects/birch/rev/6e93febee902
Flags: in-testsuite+
Whiteboard: [needs landing]
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/6e93febee902
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.