Closed
Bug 1191653
Opened 9 years ago
Closed 9 years ago
Listen to clear-origin-data in nsPermissionManager.cpp
Categories
(Core :: Permission Manager, defect)
Core
Permission Manager
Tracking
()
RESOLVED
FIXED
mozilla44
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
Attachments
(1 file, 3 obsolete files)
20.29 KB,
patch
|
allstars.chh
:
review+
|
Details | Diff | Splinter Review |
We should listen to clear-origin-data instead of webapps-clear-data, See comments from Jonas in https://bugzilla.mozilla.org/show_bug.cgi?id=1168300#c8
Assignee | ||
Comment 1•9 years ago
|
||
this will also change nsIPermissionManager.removePermissionsForApp, so making this blocks Bug 1179985
Assignee: nobody → allstars.chh
Blocks: 1179985
Assignee | ||
Comment 2•9 years ago
|
||
Assignee | ||
Comment 3•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b6e9dfa83b2f
Attachment #8673010 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8673535 -
Flags: review?(bobbyholley)
Comment 4•9 years ago
|
||
Comment on attachment 8673535 [details] [diff] [review] Patch. Review of attachment 8673535 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/ChromeUtils.cpp @@ +30,5 @@ > + > +/* static */ bool > +ChromeUtils::OriginAttributesMatchPattern(const dom::OriginAttributesDictionary& aAttrs, > + const dom::OriginAttributesPatternDictionary& aPattern) > +{ Please revert the changes in ChromeUtils, and just use |pattern.Matches| directly in any C++ consumers - there's no reason that code needs to go through ChromeUtils. ::: extensions/cookie/nsPermissionManager.cpp @@ +7,5 @@ > #include "mozilla/DebugOnly.h" > > #include "mozilla/dom/ContentParent.h" > #include "mozilla/dom/ContentChild.h" > +#include "mozilla/dom/ChromeUtils.h" Please revert this. @@ +48,5 @@ > static nsPermissionManager *gPermissionManager = nullptr; > > using mozilla::dom::ContentParent; > using mozilla::dom::ContentChild; > +using mozilla::dom::ChromeUtils; And this. @@ +2321,5 @@ > if (NS_FAILED(rv)) { > continue; > } > > + if (!ChromeUtils::OriginAttributesMatchPattern(mozilla::BasePrincipal::Cast(principal)->OriginAttributesRef(), aPattern)) { As noted above, please just do: !aPattern.Matches(mozilla::BasePrincipal::Cast(principal)->OriginAttributesRef()); ::: extensions/cookie/nsPermissionManager.h @@ +205,5 @@ > */ > + static void ClearOriginDataObserverInit(); > + > + nsresult > + RemovePermissionsForOriginAttributes(mozilla::OriginAttributesPattern& aAttrs); Please call this RemovePermissionsWithAttributes ::: extensions/cookie/test/unit/test_permmanager_cleardata.js @@ +10,4 @@ > } > > +// Return the data required by 'clear-origin-data' notification. > +function getData(aOriginAttributes) This should be "aPattern", right? ::: netwerk/base/nsIPermissionManager.idl @@ +238,2 @@ > */ > + void removePermissionsForOriginAttributes(in DOMString pattern); You should specify here that this is JSON. I'd call it "patternAsJSON" or "jsonPattern" or something.
Attachment #8673535 -
Flags: review?(bobbyholley) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8673535 -
Attachment is obsolete: true
Attachment #8674104 -
Flags: review+
Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8674104 -
Attachment is obsolete: true
Attachment #8674119 -
Flags: review+
https://hg.mozilla.org/mozilla-central/rev/48a895231734
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Comment 9•9 years ago
|
||
Nice job! Thanks Yoshi!
You need to log in
before you can comment on or make changes to this bug.
Description
•