Peter Van der Beken
46c52d2b18
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
4f2132fd1e
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
40c317a4de
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
0e20ed96ec
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
664e7d8b0e
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
c6fde75b19
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
e2f6bee4ab
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
6c2bd48298
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
88e501708c
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
00d5a50ae8
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
d0bc1a4912
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
9b9ee3e060
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
2e012c9e0f
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
063ec88ba4
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
685321b746
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
d2bbf86876
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
63aabad4f3
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
a8265c4766
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
e1cad01b80
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
a23e65c5d6
Backed out changeset d319a6fc7a34 (bug 1688815) for assertion failures. CLOSED TREE
2021-02-15 11:48:40 +02:00
Christoph Kerschbaumer
949eae05a3
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
44c81ed9bb
Backed out changeset 028bc12edb76 (bug 1688815) for causing ContentPrincipal related xpcshell crashes.
2021-02-09 21:47:11 +02:00
Christoph Kerschbaumer
71b1d5722d
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
0f05ea9b88
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
a810f4e72c
Backed out changeset cf796da336c8 (bug 1678310) due to causing memory crashes. CLOSED TREE
2020-11-24 13:00:45 +02:00
Christoph Kerschbaumer
a1c2ca7af2
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
de7bab0f06
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
f47569e9d9
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
cd8b8939b9
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
6aa06b33a7
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
03a5604053
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
a02a553ad4
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
2be753c938
Bug 1629763 - ContentPrincipal::GetBaseDomain returns a void-string for resource: URIs, r=ckerschb
...
Differential Revision: https://phabricator.services.mozilla.com/D70804
--HG--
extra : moz-landing-system : lando
2020-04-14 08:47:48 +00:00
Michal Novotny
2a483b2bc4
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
--HG--
extra : moz-landing-system : lando
2020-04-07 19:49:26 +00:00
Sebastian Streich
c7989b585d
Bug 1621310
- Remove geturi in ContentPrincipal.cpp r=ckerschb
...
Differential Revision: https://phabricator.services.mozilla.com/D66250
--HG--
extra : moz-landing-system : lando
2020-03-12 19:47:56 +00:00
Sebastian Streich
8b390d55c7
Bug 1601941 - Refactor GetURI usage in nsScriptSecurityManager.cpp r=ckerschb
...
Differential Revision: https://phabricator.services.mozilla.com/D56185
--HG--
extra : moz-landing-system : lando
2019-12-11 16:21:18 +00:00
Nathan Froyd
c4d5bb1a19
Bug 1600963 - remove some duplicate includes from ContentPrincipal.cpp; r=mccr8
...
Depends on D55689
Differential Revision: https://phabricator.services.mozilla.com/D55690
--HG--
extra : moz-landing-system : lando
2019-12-03 17:30:26 +00:00
Tom Schuster
0e913c22c4
Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
...
Differential Revision: https://phabricator.services.mozilla.com/D40677
--HG--
extra : moz-landing-system : lando
2019-08-07 19:49:40 +00:00
Cosmin Sabou
c3430326e6
Backed out changeset ca88862d6b63 (bug 1558915) for causing build bustages on StartupCacheUtils. CLOSED TREE
2019-08-07 13:20:32 +03:00
Tom Schuster
8bc1f5ada8
Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
...
Differential Revision: https://phabricator.services.mozilla.com/D40677
--HG--
extra : moz-landing-system : lando
2019-08-07 09:36:56 +00:00
Razvan Maries
eedbf1137f
Backed out changeset b197ca57677a (bug 1558915) for build bustages. CLOSED TREE
2019-08-07 01:04:43 +03:00
Tom Schuster
03c7998ef2
Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
...
Differential Revision: https://phabricator.services.mozilla.com/D40677
--HG--
extra : moz-landing-system : lando
2019-08-06 20:19:41 +00:00
Jonathan Kingston
31441f82ea
Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
...
Differential Revision: https://phabricator.services.mozilla.com/D35504
--HG--
extra : moz-landing-system : lando
2019-07-08 16:37:45 +00:00
Jonathan Kingston
a9be4620ee
Bug 1508939 - cpp serialization r=ckerschb,mccr8,mikedeboer
...
Migrating to pure Cpp
Differential Revision: https://phabricator.services.mozilla.com/D29221
--HG--
extra : moz-landing-system : lando
2019-06-03 12:37:12 +00:00
Sylvestre Ledru
d57d4905f1
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D30883
--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
arthur.iakab
af8e458c5f
Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE
2019-05-24 14:26:01 +03:00
Sylvestre Ledru
c82ea97226
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D30883
--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
Christoph Kerschbaumer
b633427366
Bug 965637: Move CSP from Principal into Client, part 1: backend changes. r=mccr8
...
Differential Revision: https://phabricator.services.mozilla.com/D27654
--HG--
extra : moz-landing-system : lando
2019-05-21 23:14:27 +00:00
Sylvestre Ledru
4aa92e3091
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
4ecb0bc14c
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