Nicholas Nethercote
9fda5528d2
Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
...
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.
These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.
- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>
- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
- Count() --> Length()
- ObjectAt() --> ElementAt()
- AppendObject() --> AppendElement()
- RemoveObjectAt() --> RemoveElementAt()
- ns*Hashtable<nsISupportsHashKey, ...> -->
ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>
- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
- This requires adding a Get() method to nsRefPtrHashtable that it lacks but
nsInterfaceHashtable has.
- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
- nsArrayBase::Create() --> nsTArray()
- GetLength() --> Length()
- do_QueryElementAt() --> operator[]
The patch also has some changes to Rust code that manipulates nsIAtom.
MozReview-Commit-ID: DykOl8aEnUJ
2017-09-26 08:33:21 +10:00
Kris Maglione
fd54e6524a
Bug 1396449: Part 2 - Use atoms to test WebExtension permissions. r=krizsa
...
The extension policy services uses atoms internally for permission names, so
using them directly rather than strings is considerably cheaper.
MozReview-Commit-ID: Io8EuOXHKVy
2017-09-03 18:51:02 -07:00
Kris Maglione
23f86a0885
Bug 1396449: Part 1 - Use WebExtensionPolicy objects in extension content principals. r=krizsa
...
Going through the extension policy service rather than using
WebExtensionPolicy objects directly adds a lot of unnecessary overhead to
common operations on extension principals, and also makes the code more
complicated than it needs to be.
We also use weak references to policy objects here, since principals should
ideally lose as much of their elevated privileges as possible once the
extension instance that created them has been destroyed (which is something we
couldn't handle easily when we simply tracked ID strings).
MozReview-Commit-ID: KDNvVdvLkIt
2017-09-05 11:04:43 -07:00
Kris Maglione
c3fe38bd9b
Bug 1356334: Part 1 - Add helpers for safely casting principals without COM overhead. r=bholley
...
MozReview-Commit-ID: EOtK17WiLZl
2017-04-16 13:32:42 -07:00
Ryan VanderMeulen
0980b8abd2
Backed out 8 changesets (bug 1356334) for frequent test_ext_contentscript_async_loading.html failures on Android debug on a CLOSED TREE.
...
Backed out changeset 9c677ebfdda0 (bug 1356334)
Backed out changeset 16b49fd1c38a (bug 1356334)
Backed out changeset 4f5bcd2b2dc6 (bug 1356334)
Backed out changeset d832803270ac (bug 1356334)
Backed out changeset b83aea215a82 (bug 1356334)
Backed out changeset b2a663ffd144 (bug 1356334)
Backed out changeset 805c56806930 (bug 1356334)
Backed out changeset 7c880eca810a (bug 1356334)
2017-08-18 11:32:18 -04:00
Kris Maglione
5c03c1265a
Bug 1356334: Part 1 - Add helpers for safely casting principals without COM overhead. r=bholley
...
MozReview-Commit-ID: EOtK17WiLZl
2017-04-16 13:32:42 -07:00
Andrea Marchesini
218ada4936
Bug 1369316 - Get rid of nsIPrincipal.unknownAppId, r=bholley
2017-06-02 11:05:28 +02:00
Andrea Marchesini
d3da9d5dcc
Bug 1369310 - Get rid of nsIPrincipal.appStatus, r=bholley
2017-06-02 11:05:28 +02:00
Andrea Marchesini
bbcb9558a8
Bug 1347817 - Principal must always have a valid origin - part 4 - origin passed as argument when a principal is created, r=bholley
2017-03-29 08:24:01 +02:00
Andrea Marchesini
19aafd919a
Bug 1347817 - Principal must always have a valid origin - part 3 - move origin to BasePrincipal, r=bholley
2017-03-29 08:22:26 +02:00
Andrea Marchesini
6fe82c7556
Bug 1347817 - Principal must always have a valid origin - part 2 - move OriginAttributes to the BasePrincipal, r=bholley
2017-03-29 08:21:03 +02:00
Andrea Marchesini
c7bbc2d296
Bug 1347817 - Principal must always have a valid origin - part 1 - renaming GetOriginInternal to GetOriginNoSuffixInternal, r=qdot
2017-03-29 08:19:41 +02:00
Sebastian Hengst
a21bff2730
Backed out changeset a70b549ac35d (bug 1347817) for failing test_websocket-transport.html on OSX 10.10 debug. r=backout
2017-03-29 11:18:41 +02:00
Sebastian Hengst
8b8601de62
Backed out changeset c0e8522353bd (bug 1347817)
2017-03-29 11:17:22 +02:00
Sebastian Hengst
9ca06ec746
Backed out changeset d71d95c73542 (bug 1347817)
2017-03-29 11:17:18 +02:00
Sebastian Hengst
419dd35b4e
Backed out changeset 059bcee1ccda (bug 1347817)
2017-03-29 11:17:13 +02:00
Andrea Marchesini
0ae94345ff
Bug 1347817 - Principal must always have a valid origin - part 4 - origin passed as argument when a principal is created, r=bholley
2017-03-29 08:24:01 +02:00
Andrea Marchesini
694063938b
Bug 1347817 - Principal must always have a valid origin - part 3 - move origin to BasePrincipal, r=bholley
2017-03-29 08:22:26 +02:00
Andrea Marchesini
049b4fd509
Bug 1347817 - Principal must always have a valid origin - part 2 - move OriginAttributes to the BasePrincipal, r=bholley
2017-03-29 08:21:03 +02:00
Andrea Marchesini
f1952ab550
Bug 1347817 - Principal must always have a valid origin - part 1 - renaming GetOriginInternal to GetOriginNoSuffixInternal, r=qdot
2017-03-29 08:19:41 +02:00
Andrea Marchesini
1bf473c2be
Bug 1349512 - Move OriginAttributes class in separate files, r=qdot
2017-03-22 18:45:40 +01:00
Andrea Marchesini
73e2ac514b
Bug 1343933 - Renaming Principal classes - part 1 - ExpandedPrincipal, r=qdot
2017-03-22 11:38:17 +01:00
Frederik Braun
8cf7f95796
Bug 1073952: inherit CSP into iframe sandbox srcdoc r=ckerschb,Tomcat
...
MozReview-Commit-ID: 3fhWCGwgG4A
2017-01-30 14:09:37 +01:00
Yoshi Huang
6c76de3e9f
Bug 1300671 - set firstPartyDomain on about: pages. r=smaug
...
When we load about:blank in a remote tab, it will have
LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL flag set, which will make
NullPrinicipal as its document principal. So we add
NULL_PRINCIPAL_FIRST_PARTY_DOMAIN as its firstPartyDomain.
So when we load data:, or javascript: URI in a remote tab, it will inherit the
principal from about:blank, hence also inherit the origin attributes.
There are also some about: pages will use codebase principal, so we also
set ABOUT_URI_FIRST_PARTY_DOMAIN as firstPartyDomain on their
principals.
2017-03-14 16:22:02 +08:00
Andrea Marchesini
313424057b
Bug 1345168 - Get rid of OriginAttributes::Inherit, r=tjr
2017-03-08 07:41:51 +01:00
Ehsan Akhgari
25b778293e
Bug 1344974 - Part 2: Make the non-virtual helpers for principal equality/subsumption checks inline; r=bholley
2017-03-07 00:29:27 -05:00
Ehsan Akhgari
b82dbd00e9
Bug 1344974 - Part 1: Factor out more non-virtual helpers for principal equality/subsumption checks; r=bholley
2017-03-07 00:22:21 -05:00
Ehsan Akhgari
9f8cc065d8
Bug 1340710 - Part 8: Add a fast path for nsIPrincipal::EqualsConsideringDomain() and nsIPrincipal::SubsumesConsideringDomain(); r=bholley
2017-03-06 22:30:54 -05:00
Ehsan Akhgari
7ed319952d
Bug 1340710 - Part 7: Add a fast path for nsIPrincipal::Equals() and nsIPrincipal::EqualsConsideringDomain(); r=bholley
2017-03-06 22:27:59 -05:00
Ehsan Akhgari
9212df9651
Bug 1340710 - Part 6: Store BasePrincipal::{mOriginNoSuffix,mOriginSuffix} as a pair of atoms; r=bholley
...
This has the nice side effect of making nsIPrincipal::GetOrigin() a bit faster
by avoiding computing the origin each time.
2017-03-06 22:27:53 -05:00
Ehsan Akhgari
1e04cc2a0b
Bug 1340710 - Part 2: De-virtualize BasePrincipal::Kind(); r=bholley
2017-03-06 22:27:37 -05:00
Kris Maglione
a54dba80da
Bug 1314361 - Part 6: Remove the addonId origin attribute. r=bholley
2016-11-08 17:11:32 -08:00
Kris Maglione
88a6d45c04
Bug 1314361 - Part 5: Remove origin attribute comparison helpers for ignoring addonId. r=bholley
2016-11-04 14:32:26 -07:00
Kris Maglione
8ead2c300a
Bug 1314361 - Part 1: Generate nsIPrincipal.addonId from AddonPolicyService rather than origin attributes. r=billm
2016-11-05 22:38:17 -07:00
Olli Pettay
8f054dfb40
Bug 1339213 - Inline IsRestrictOpenerAccessForFPI, r=tihuang
2017-02-14 13:45:35 +02:00
Shane Caraveo
2167bf8191
Bug 1308640 bypass TP when addon has explicit permission to url, r=bz,kmag,mrbkap
...
MozReview-Commit-ID: BIhoUY2Ug8k
2017-02-09 21:08:06 -08:00
Daniel Holbert
b0979d65a2
Bug 1259348 part 1: Remove CSSUnprefixingService.js and associated code (since it's been supplanted by built-in webkit-prefixed-CSS support). r=mats
...
MozReview-Commit-ID: CXCJJWhHc8G
2017-02-03 14:56:13 -08:00
Tim Huang
41ba1794fb
Bug 1319773 - Part 2: Add a pref 'privacy.firstparty.isolate.restrict_opener_access' which controls the access of window.opener for different first party domain. r=baku
2017-01-23 10:50:22 +08:00
Tim Huang
2386b8b73e
Bug 1319773 - Part 1: Add a SubsumesConsideringDomainIgnoringFPD in BasePrincipal. r=baku
2017-01-18 20:17:19 +08:00
Andrea Marchesini
46a9207d60
Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby
2017-01-12 17:38:48 +01:00
dimi
d2fb140df2
Bug 1320402 - Move url-classifier off of using appIds. r=ehsan, gcp
...
MozReview-Commit-ID: IqnAVrv2c9W
2017-01-03 14:21:58 +08:00
Yoshi Huang
c7c27443b8
Bug 1324115 - Part 1: add a C++ helper in nsIPrincipal. r=smaug
2016-12-21 14:59:20 +08:00
Andrea Marchesini
7f1ffc13c7
Bug 1317927 - Media caching needs to use origin attributes, r=cpearce, r=jesup
2016-12-07 07:07:09 -10:00
Andrea Marchesini
6fdea0f7b1
Bug 1315905 - Cleanup Necko http security check - part 1, r=valentin
2016-11-17 14:52:16 +01:00
Tim Huang
6974172f05
Bug 1313627 - Get the firstPartyDomain from the nodePrincipal of the document in nsDocShell::CanAccessItem() if the first party isolation is on. r=smaug
2016-11-10 14:20:38 +08:00
Valentin Gosu
1aeab3d62d
Bug 1315302 - Remove signedPkg from origin attributes r=baku
...
MozReview-Commit-ID: L1xvRgeO6De
2016-11-06 16:15:36 +01:00
Kris Maglione
778851028d
Bug 1308920: Part 1 - Add an EqualsIgnoringAddonId method to BasePrincipal. r=bholley
...
This is meant as a temporary stopgap until we can stop using origin attributes
to store add-on IDs.
MozReview-Commit-ID: DHstOTyu7pR
2016-11-02 10:04:13 -07:00
Dave Huseby
5431eeef89
Bug 1189086 - Eliminate nsIPrincipal::jarPrefix. r=dveditz
2016-10-24 13:52:00 +02:00
Jonathan Hao
fa31206f09
Bug 1302047 - Ignore userContextId and firstPartyDomain when matching permissions. r=baku
2016-09-20 16:35:21 +08:00
Yoshi Huang
c346f0771b
Bug 1260931 - Part 3: Propagate firstPartyDomain. r=smaug
2016-09-06 10:25:58 +08:00