Peter Van der Beken
37b19ffb8b
Bug 1795312 - Optimize serializing enums as JSON string keys for principals. r=farre
...
Depends on D166953
Differential Revision: https://phabricator.services.mozilla.com/D166954
2023-02-14 10:17:17 +00:00
Cristina Horotan
235d59573c
Backed out 5 changesets (bug 1795312) for causing build bustage at BasePrincipal.h on a CLOSED TREE
...
Backed out changeset c4f9e74d6164 (bug 1795312)
Backed out changeset 2594a213283c (bug 1795312)
Backed out changeset bc1c5b1c2d85 (bug 1795312)
Backed out changeset 38f9e767cc32 (bug 1795312)
Backed out changeset a732c5bcc392 (bug 1795312)
2023-02-08 19:33:48 +02:00
Peter Van der Beken
39b2b4cf3b
Bug 1795312 - Optimize serializing enums as JSON string keys for principals. r=farre
...
Differential Revision: https://phabricator.services.mozilla.com/D166954
2023-02-08 12:57:10 +00:00
Andrew McCreight
4f887b4632
Bug 961019 - Remove nsIClassInfo::MAIN_THREAD_ONLY. r=peterv,necko-reviewers
...
XPConnect has been single threaded for a long time, so this
flag doesn't do anything.
Differential Revision: https://phabricator.services.mozilla.com/D168442
2023-02-01 21:45:44 +00:00
Nika Layzell
f1f8e09577
Bug 1443925 - Part 10: Use AddonPolicyCore rather than AddonPolicy for principals, r=ckerschb,extension-reviewers,kmag
...
This changes out almost all places `AddonPolicy()` is used within nsIPrincipal
implementations, replacing it with the threadsafe `AddonPolicyCore()` method
and `WebExtensionPolicyCore` type.
Differential Revision: https://phabricator.services.mozilla.com/D163040
2022-12-02 00:53:53 +00:00
Nika Layzell
02316c72e8
Bug 1443925 - Part 6: Allow specifying Domain when creating content principals, r=ckerschb,bholley
...
This is required for deserializing nsIPrincipal instances from PrincipalInfo to
be threadsafe, as setting domain with `SetDomain()` is only safe on the main
thread, due to it enumerating and updating JS wrappers.
Differential Revision: https://phabricator.services.mozilla.com/D163036
2022-12-02 00:53:51 +00:00
Nika Layzell
56e111f24f
Bug 1443925 - Part 2: Make basic manipulation of nsIPrincipal threadsafe, r=ckerschb
...
This patch only makes the very basics of nsIPrincipal manipulation threadsafe,
such as reference counting, and some trivial methods. The more complex methods
will be made threadsafe in following parts.
Differential Revision: https://phabricator.services.mozilla.com/D163032
2022-12-02 00:53:50 +00:00
Olli Pettay
a805880c6f
Bug 1802511, optimize ContentPrincipal::SubsumesInternal by checking FastEquals, r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D163242
2022-11-28 23:29:01 +00:00
Nika Layzell
8f137b4b72
Bug 1793995 - Part 1: Move immutable parts of WebExtensionPolicy to a threadsafe core type, r=kmag
...
This threadsafe core type also acts as a weak reference to the main-thread
WebExtensionPolicy when needed. This will be used when information about a
WebExtension is needed to be accessible off-main-thread in the future.
Differential Revision: https://phabricator.services.mozilla.com/D158879
2022-10-13 21:46:58 +00:00
Cristian Tuns
8d27a1d79c
Backed out 15 changesets (bug 1794001, bug 1793995, bug 1693271) for causing build bustages CLOSED TREE
...
Backed out changeset 5d4b0c23342f (bug 1793995)
Backed out changeset 79a5023e7822 (bug 1793995)
Backed out changeset 4330821df43f (bug 1793995)
Backed out changeset a653699a5cef (bug 1793995)
Backed out changeset 264a0154514e (bug 1793995)
Backed out changeset 6773cada61a8 (bug 1793995)
Backed out changeset d55a78f3627a (bug 1793995)
Backed out changeset 16299839e25e (bug 1793995)
Backed out changeset 10c5cf69b3f0 (bug 1693271)
Backed out changeset 84e7bf515c94 (bug 1693271)
Backed out changeset b8dbabe61a9a (bug 1794001)
Backed out changeset 3cfe4087793d (bug 1794001)
Backed out changeset dd03b0396eb9 (bug 1794001)
Backed out changeset d4f9b4a3029a (bug 1794001)
Backed out changeset 148d136ce549 (bug 1794001)
2022-10-12 22:12:26 -04:00
Nika Layzell
ccf9378b76
Bug 1793995 - Part 1: Move immutable parts of WebExtensionPolicy to a threadsafe core type, r=kmag
...
This threadsafe core type also acts as a weak reference to the main-thread
WebExtensionPolicy when needed. This will be used when information about a
WebExtension is needed to be accessible off-main-thread in the future.
Differential Revision: https://phabricator.services.mozilla.com/D158879
2022-10-12 23:57:22 +00:00
Cristian Tuns
d6fbf59d81
Backed out 15 changesets (bug 1794001, bug 1693271, bug 1793995) for causing build bustages on RustRegex.h CLOSED TREE
...
Backed out changeset 93fa076646e1 (bug 1793995)
Backed out changeset 3deec78af656 (bug 1793995)
Backed out changeset 61d74f2cf5cf (bug 1793995)
Backed out changeset 8484584cc787 (bug 1793995)
Backed out changeset f7d78fffc836 (bug 1793995)
Backed out changeset 37ccdfa60f9a (bug 1793995)
Backed out changeset 06d7d4823419 (bug 1793995)
Backed out changeset 5cb4daddadb9 (bug 1793995)
Backed out changeset 8b71c15f24c7 (bug 1693271)
Backed out changeset 77c06db920fe (bug 1693271)
Backed out changeset e286fb05d64f (bug 1794001)
Backed out changeset ea8ba9ce54c8 (bug 1794001)
Backed out changeset 27715593ce6f (bug 1794001)
Backed out changeset d1030c02b560 (bug 1794001)
Backed out changeset 80b01e63ca54 (bug 1794001)
2022-10-12 12:57:05 -04:00
Nika Layzell
a87a62c0d2
Bug 1793995 - Part 1: Move immutable parts of WebExtensionPolicy to a threadsafe core type, r=kmag
...
This threadsafe core type also acts as a weak reference to the main-thread
WebExtensionPolicy when needed. This will be used when information about a
WebExtension is needed to be accessible off-main-thread in the future.
Differential Revision: https://phabricator.services.mozilla.com/D158879
2022-10-12 15:39:53 +00:00
Mike Conley
0f035d4299
Bug 1760417 - Make ContentPrincipal more reliable for URIs in the form of scheme://.origin.tld. r=nika,ckerschb
...
Attempting to get the siteOrigin for a URI of something like "https://.mozilla.org "
was returning NS_ERROR_ILLEGAL_VALUE, which caused breakage in parts of the browser
UI when trying to initialize a window to point at that URI.
It looks like the NS_ERROR_ILLEGAL_VALUE stuff was added back in bug 1491728 as
part of an effort to better handle some IPv6 stuff. I tested the STR in bug 1491728
for the original bug, and I cannot reproduce the issue even witht his change.
nika suggested that instead of returning NS_ERROR_ILLEGAL_VALUE for this form of
URI, we return the same value as `nsIPrincipal.origin`.
Differential Revision: https://phabricator.services.mozilla.com/D142493
2022-04-04 13:40:50 +00:00
Emilio Cobos Álvarez
76b6dc6000
Bug 1755947 - Simplify nsIPrincipal.isSameOrigin(). r=bholley
...
Differential Revision: https://phabricator.services.mozilla.com/D139030
2022-02-17 18:11:58 +00:00
André Bargull
3f9e70360a
Bug 1726123 - Part 5: Add missing "js/" includes outside of SM. r=arai
...
In preparation for the next part, add missing includes to "js/" public headers.
Differential Revision: https://phabricator.services.mozilla.com/D122843
2021-08-17 15:45:39 +00:00
Valentin Gosu
e1e71138ee
Bug 1570786 - Avoid ContentPrincipal::GetURI null deref r=necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D117903
2021-06-21 12:03:46 +00:00
Nika Layzell
8fe0b1faf0
Bug 1711078 - Part 2: Mark immutable fields in principal types as const, r=ckerschb
...
This is a step towards separating the mutable state on principals from const
state which can be made threadsafe. The remaining mutable fields will either
need to be moved off of nsIPrincipal or made threadsafe to destroy (e.g. using
nsMainThreadPtrHandle) and stored behind a mutex.
Serialization is handled for most types using a separate Deserializer class,
like how it was handled with `nsIURI` mutators. SystemPrincipal wasn't changed
as the `Read` method is a no-op for that class.
Differential Revision: https://phabricator.services.mozilla.com/D115092
2021-05-17 20:50:09 +00:00
Christoph Kerschbaumer
451e977d4f
Bug 1688815: Update GetSiteOriginNoSuffix() to handle view-source correctly. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D102200
2021-03-03 18:47:53 +00:00
Brindusan Cristian
ec7c597bed
Backed out changeset d319a6fc7a34 (bug 1688815) for assertion failures. CLOSED TREE
2021-02-15 11:48:40 +02:00
Christoph Kerschbaumer
84a9281782
Bug 1688815: Update GetSiteOriginNoSuffix() to handle view-source correctly. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D102200
2021-02-15 08:50:47 +00:00
Cosmin Sabou
c1293fe6ca
Backed out changeset 028bc12edb76 (bug 1688815) for causing ContentPrincipal related xpcshell crashes.
2021-02-09 21:47:11 +02:00
Christoph Kerschbaumer
dc5011080d
Bug 1688815: Update GetSiteOriginNoSuffix() to handle view-source correctly. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D102200
2021-02-09 18:54:28 +00:00
Christoph Kerschbaumer
3bcc9d23de
Bug 1678310: Expose siteOriginNoSuffix on nsIPrincipal r=baku,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D97605
2020-11-28 07:21:32 +00:00
Csoregi Natalia
ce38d64c63
Backed out changeset cf796da336c8 (bug 1678310) due to causing memory crashes. CLOSED TREE
2020-11-24 13:00:45 +02:00
Christoph Kerschbaumer
acd8299f67
Bug 1678310: Expose siteOriginNoSuffix on nsIPrincipal r=baku
...
Differential Revision: https://phabricator.services.mozilla.com/D97605
2020-11-24 09:04:56 +00:00
Simon Giesecke
ab6f0a7137
Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Jon Coppeard
8b2e472e5d
Bug 1654523 - Insist that iteration callbacks don't GC r=sfink,mccr8
...
Differential Revision: https://phabricator.services.mozilla.com/D84500
2020-07-23 02:31:57 +00:00
Simon Giesecke
a69d79b6db
Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kris Maglione
e443589f1b
Bug 1645510: Part 2 - Avoid using the unprivileged junk scope where possible. r=bholley
...
Differential Revision: https://phabricator.services.mozilla.com/D79720
2020-06-27 03:06:28 +00:00
Sylvestre Ledru
da4f62a328
Bug 1643347 - set hasFlag default value to avoid a -Wuninitialized-const-reference warning in ContentPrincipal.cpp r=dmajor
...
Differential Revision: https://phabricator.services.mozilla.com/D78289
2020-06-04 14:46:32 +00:00
Cosmin Sabou
ef8e6d4d0e
Backed out changeset 8523af037d8f (bug 1629763) for causing assertion failures on WorkerPrivate.cpp. CLOSED TREE
2020-04-14 16:03:09 +03:00
Andrea Marchesini
af5d8dd1a4
Bug 1629763 - ContentPrincipal::GetBaseDomain returns a void-string for resource: URIs, r=ckerschb
...
Differential Revision: https://phabricator.services.mozilla.com/D70804
2020-04-14 08:47:48 +00:00
Michal Novotny
af190cb556
Bug 1622409 - Put FTP code behind a pref r=marionette-reviewers,valentin,whimboo,mixedpuppy
...
Disables FTP protocol handler on nightly. FTP scheme is handled by external protocol handler if it isn't explicitly disabled with preference network.protocol-handler.external.ftp = false.
Differential Revision: https://phabricator.services.mozilla.com/D68974
2020-04-07 19:49:26 +00:00
Sebastian Streich
7bddf5b658
Bug 1621310 - Remove geturi in ContentPrincipal.cpp r=ckerschb
...
Differential Revision: https://phabricator.services.mozilla.com/D66250
2020-03-12 19:47:56 +00:00
Sebastian Streich
77022538f4
Bug 1601941 - Refactor GetURI usage in nsScriptSecurityManager.cpp r=ckerschb
...
Differential Revision: https://phabricator.services.mozilla.com/D56185
2019-12-11 16:21:18 +00:00
Nathan Froyd
1b093fdd13
Bug 1600963 - remove some duplicate includes from ContentPrincipal.cpp; r=mccr8
...
Depends on D55689
Differential Revision: https://phabricator.services.mozilla.com/D55690
2019-12-03 17:30:26 +00:00
Tom Schuster
762d72788c
Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
...
Differential Revision: https://phabricator.services.mozilla.com/D40677
2019-08-07 19:49:40 +00:00
Cosmin Sabou
1f03c5075f
Backed out changeset ca88862d6b63 (bug 1558915) for causing build bustages on StartupCacheUtils. CLOSED TREE
2019-08-07 13:20:32 +03:00
Tom Schuster
d2142a7020
Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
...
Differential Revision: https://phabricator.services.mozilla.com/D40677
2019-08-07 09:36:56 +00:00
Razvan Maries
b95c923ca6
Backed out changeset b197ca57677a (bug 1558915) for build bustages. CLOSED TREE
2019-08-07 01:04:43 +03:00
Tom Schuster
70c09c881c
Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
...
Differential Revision: https://phabricator.services.mozilla.com/D40677
2019-08-06 20:19:41 +00:00
Jonathan Kingston
32524b62e2
Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
...
Differential Revision: https://phabricator.services.mozilla.com/D35504
2019-07-08 16:37:45 +00:00
Jonathan Kingston
9ae59de314
Bug 1508939 - cpp serialization r=ckerschb,mccr8,mikedeboer
...
Migrating to pure Cpp
Differential Revision: https://phabricator.services.mozilla.com/D29221
2019-06-03 12:37:12 +00:00
Sylvestre Ledru
69746836db
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D30883
2019-05-25 17:46:15 +00:00
arthur.iakab
699b884244
Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE
2019-05-24 14:26:01 +03:00
Sylvestre Ledru
10a773a4ca
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D30883
2019-05-24 09:59:17 +00:00
Christoph Kerschbaumer
29451e9f5e
Bug 965637: Move CSP from Principal into Client, part 1: backend changes. r=mccr8
...
Differential Revision: https://phabricator.services.mozilla.com/D27654
2019-05-21 23:14:27 +00:00
Sylvestre Ledru
b31009da86
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Jan Varga
1b2b52d476
Bug 1526891 - Part 2: Make it possible to use MozURL by QuotaManager for all URIs (instead of using nsIPrincipal); r=nika,asuth
...
Differential Revision: https://phabricator.services.mozilla.com/D20906
2019-02-23 10:13:08 +01:00