Commit Graph

2465 Commits

Author SHA1 Message Date
Mark Banner
130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner
8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
nicklas boman
5e31225558 Bug 1724649 - Followup to remove #include plstr.h r=necko-reviewers,xpcom-reviewers,valentin,nika
Differential Revision: https://phabricator.services.mozilla.com/D177690
2023-05-15 14:53:02 +00:00
anonymous0000007
3db6038aa5 Bug 1710232 - remove dead code unused function UseSiteForFirstPartyDomain in OriginAttributes.h. r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D176790
2023-05-03 13:25:42 +00:00
Nika Layzell
d57c9498f6 Bug 1825360 - Remove the NS_DISPATCH_SYNC flag, r=necko-reviewers,geckoview-reviewers,media-playback-reviewers,karlt,jesup,m_kato,emilio
This flag is not supported by most event targets and can have unexpected
side effects (namely spinning a nested event loop). All consumers have
been replaced with a new function which is more explicit about this side
effect.

Differential Revision: https://phabricator.services.mozilla.com/D173985
2023-03-30 16:53:51 +00:00
Mark Banner
4a729cf9d7 Bug 1824173 - Automatically fix some ESLint issues raised by the valid-jsdoc configuration. r=mossop,webcompat-reviewers,denschub
Differential Revision: https://phabricator.services.mozilla.com/D173450
2023-03-24 19:35:24 +00:00
Kershaw Chang
5e58575e28 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-21 09:09:58 +00:00
june wilde
05c279a3d2 Bug 1776755 - Skip ordering ExpandedPrincipals to speed up creation; r=nika,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D161450
2023-03-13 14:52:04 +00:00
Marian-Vasile Laza
ee72efd1e9 Backed out 5 changesets (bug 1809843) for causing Cargo related build bustages. CLOSED TREE
Backed out changeset 5c494680f448 (bug 1809843)
Backed out changeset 02742b38edab (bug 1809843)
Backed out changeset 2b9b32ca8294 (bug 1809843)
Backed out changeset 56631cb02ae6 (bug 1809843)
Backed out changeset 37e35a60a71f (bug 1809843)
2023-03-13 13:53:26 +02:00
Kershaw Chang
a60df34ad0 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-13 11:12:33 +00:00
serge-sans-paille
f9b7740fc8 Bug 1818446 - Make caps/tests/gtest buildable outside of a unified build environment r=andi
Depends on D170728

Differential Revision: https://phabricator.services.mozilla.com/D170729
2023-02-27 13:43:01 +00:00
Butkovits Atila
2f6b1a7ad1 Backed out changeset 3cdcc72baa6e (bug 1776755) for causing failures at test_ext_contentscript_triggeringPrincipal.js. 2023-02-14 19:30:16 +02:00
june wilde
9f0c374a0a Bug 1776755 - Skip ordering ExpandedPrincipals to speed up creation; r=nika,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D161450
2023-02-14 15:03:40 +00:00
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
Peter Van der Beken
cec60f10c8 Bug 1795312 - Avoid a Json::Value copy. r=farre
Depends on D166810

Differential Revision: https://phabricator.services.mozilla.com/D166953
2023-02-14 10:17:17 +00:00
Peter Van der Beken
05fc824ead Bug 1795312 - Cache the Json::StreamWriterBuilder for serializing principals. r=farre
Depends on D166783

Differential Revision: https://phabricator.services.mozilla.com/D166810
2023-02-14 10:17:17 +00:00
Andreas Farre
b09078e6a7 Bug 1795312 - Don't Base64 encode principals when serializing. r=peterv
Base64 encoding is done to top-level principal and the sub-principals
of expanded principals. Getting rid of the Base64 encoding entirely
also lets us use jsoncpp consider expanded principals to be entirely
serialized as JSON.

Differential Revision: https://phabricator.services.mozilla.com/D166783
2023-02-14 10:17:16 +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
Andreas Farre
5a15e3845e Bug 1795312 - Remove newly introduced intermittent test. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D169205
2023-02-08 16:05:52 +00: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
Peter Van der Beken
ac65f99ac2 Bug 1795312 - Avoid a Json::Value copy. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D166953
2023-02-08 12:57:10 +00:00
Peter Van der Beken
6fc2cc9d41 Bug 1795312 - Cache the Json::StreamWriterBuilder for serializing principals. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D166810
2023-02-08 12:57:09 +00:00
Andreas Farre
ff25742a1d Bug 1795312 - Don't Base64 encode principals when serializing. r=peterv
Base64 encoding is done to top-level principal and the sub-principals
of expanded principals. Getting rid of the Base64 encoding entirely
also lets us use jsoncpp consider expanded principals to be entirely
serialized as JSON.

Differential Revision: https://phabricator.services.mozilla.com/D166783
2023-02-08 12:57:09 +00:00
Cristian Tuns
429b1e8615 Backed out changeset 2b1d90490648 (bug 1776755) for causing xpcshells failures CLOSED TREE 2023-02-07 12:53:31 -05:00
june wilde
46711bc1dc Bug 1776755 - Skip ordering ExpandedPrincipals to speed up creation; r=nika,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D161450
2023-02-07 16:47:29 +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
Dave Townsend
b752598495 Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2023-01-07 17:53:19 +00:00
Sylvestre Ledru
1f8d23143a Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D165559
2022-12-28 09:52:44 +00:00
Stanca Serban
bd29139bde Backed out changeset 514642d76faa (bug 1792138) for causing mochitests failures in test_ext_protocolHandlers.html. CLOSED TREE 2022-12-13 14:53:38 +02:00
Dave Townsend
e021cf6a60 Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2022-12-13 10:43:32 +00:00
Nika Layzell
8351f7cc2d Bug 1804093 - Part 5: Eliminate WorkerPrincipal and WorkletPrincipals, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D163856
2022-12-12 22:08:36 +00:00
Nika Layzell
6bde10f55f Bug 1804093 - Part 4: Allow ReadKnownPrincipalType off-main-thread, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D163855
2022-12-12 22:08:35 +00:00
Nika Layzell
4a23819d11 Bug 1443925 - Part 12: Add some basic tests for using nsIPrincipal off-main-thread, r=ckerschb
These are far from comprehensive, and act mostly as smoke-tests that the
principal code is usable from off-main-thread.

Differential Revision: https://phabricator.services.mozilla.com/D163042
2022-12-02 00:53:54 +00:00
Nika Layzell
2869537fdd Bug 1443925 - Part 11: Document thread safety requirements for most principal methods, r=ckerschb
After the previous changes, the majority of methods on nsIPrincipal are now
threadsafe. This patch documents which methods are still bound to the main
thread, and adds thread assertions to them to avoid potential misuse.

Differential Revision: https://phabricator.services.mozilla.com/D163041
2022-12-02 00:53:53 +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
b582df1238 Bug 1443925 - Part 5: Make it possible to get the system principal from any thread, r=ckerschb
This is required because the script security manager which currently owns the
singleton is main-thread only. This change still ties the lifecycle of the
static to that service, but also makes it generally available from any thread.

Differential Revision: https://phabricator.services.mozilla.com/D163035
2022-12-02 00:53:51 +00:00
Nika Layzell
59c29d8099 Bug 1443925 - Part 4: Avoid fetching nsScriptSecurityManager in BasePrincipal::IsSameOrigin, r=ckerschb
The script security manager is not a threadsafe service, but the method just
calls SecurityCompareURIs (which was made threadsafe in part 3). Switch to
calling that directly.

Differential Revision: https://phabricator.services.mozilla.com/D163034
2022-12-02 00:53:50 +00:00
Nika Layzell
ee682d387a Bug 1443925 - Part 3: Make nsScriptSecurityManager::GetStrictFileOriginPolicy threadsafe, r=ckerschb
This is used in various places in principals, as well as in the implementation
of nsScriptSecurityManager::SecurityCompareURIs which is also now threadsafe
after this change.

Differential Revision: https://phabricator.services.mozilla.com/D163033
2022-12-02 00:53:50 +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
Stanca Serban
3811bf75f5 Backed out changeset 02a9e51358f1 (bug 1792138) for causing mochitests failures on browser_ext_windows_create_url.js. CLOSED TREE 2022-11-17 18:38:00 +02:00
Dave Townsend
1573156d9c Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2022-11-17 14:44:57 +00:00
Stanca Serban
d7154c3939 Backed out changeset e14d08963786 (bug 1792138) for causing mochitest failures on browser_protocol_ask_dialog_permission.js. CLOSED TREE 2022-11-17 14:57:36 +02:00
Mark Banner
ec76a72706 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (miscellaneous). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D161917
2022-11-17 12:00:32 +00:00
Dave Townsend
409d66befd Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2022-11-17 11:08:48 +00:00
Jan Varga
f40ce49b02 Bug 1790207 - Forward declaration of mozilla::Result in nsIGlobalObject.h and other cleanup; r=dom-storage-reviewers,jesup
Depends on D162087

Differential Revision: https://phabricator.services.mozilla.com/D162088
2022-11-15 17:13:02 +00:00
Randell Jesup
229303901a Bug 1790207: Provide cross-origin security checks for OPFS r=nika,asuth
Differential Revision: https://phabricator.services.mozilla.com/D157892
2022-11-15 17:13:01 +00:00
june wilde
6b9eed58dd Bug 1764391 - truncate ExpandedPrincipals in LoadInfo::RedirectChain; r=freddyb,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D157621
2022-10-18 18:01:58 +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