Граф коммитов

2508 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 0316dc51b9 Bug 1790614 - Part 2: Use {ASSERT,ENSURE}_NS_{SUCCEEEDED,FAILED} in gtests, r=ahal,necko-reviewers
These macros will produce better outputs when they fail than these existing
patterns using `ENSURE_TRUE(NS_SUCCEEDED(...))` or similar, so this is a bulk
rewrite of existing tests to use them.

It should also help with discoverability when people base their tests off of
other existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D157214
2022-09-15 14:51:50 +00:00
Rob Wu a181c16953 Bug 1789751 - Remove localhost from MV3 CSP r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D156758
2022-09-10 23:49:49 +00:00
Shane Caraveo 3978bd8144 Bug 1783078 require web_accessible_resources for any extension loads from a content script r=robwu,ckerschb
Enforce requiring web accessible resources in MV3 and use a pref to turn on later for MV2.

Differential Revision: https://phabricator.services.mozilla.com/D153677
2022-08-05 04:36:30 +00:00
Mark Banner 7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Shane Caraveo f1212fb1db Bug 1711168 support extension matching in webAccessibleResources r=zombie,smaug,rpl
Differential Revision: https://phabricator.services.mozilla.com/D115114
2022-08-02 17:08:58 +00:00
Nika Layzell effe5537b9 Bug 1772006 - Part 6: Simplify and move the find+replace methods from ns[T]StringObsolete, r=xpcom-reviewers,barret
The remaining methods in ns[T]StringObsolete are all find+replace methods for
nsTSubstring. These were migrated in a similar way to the find methods, and
partially updated to avoid using methods from nsStringObsolete.cpp.

This change removes the ns[T]StringObsolete.cpp files completely, as they are
no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D148301
2022-07-30 00:12:49 +00:00
Brenden Hyde 62c1ece648 Bug 1761614 - Configure eslint to disable check for unused variable "printAttrs" r=Standard8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D152949
2022-07-28 15:33:32 +00:00
Butkovits Atila ae6f4c94fc Backed out 3 changesets (bug 1711168, bug 1773115) for causing failures at test_ext_web_accessible_resources.html. CLOSED TREE
Backed out changeset 703c909eb009 (bug 1773115)
Backed out changeset 902385a7ce60 (bug 1711168)
Backed out changeset 3d061ce03de7 (bug 1711168)
2022-07-27 00:13:26 +03:00
Shane Caraveo a73cd6df49 Bug 1711168 support extension matching in webAccessibleResources r=zombie,smaug,rpl
Differential Revision: https://phabricator.services.mozilla.com/D115114
2022-07-26 19:39:14 +00:00
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
Tooru Fujisawa 52c95734e7 Bug 1667455 - Part 9: Stop importing Services.jsm from chrome-priv HTML code, single-line cases. r=kmag,necko-reviewers,geckoview-reviewers,extension-reviewers,m_kato,dragana
Differential Revision: https://phabricator.services.mozilla.com/D150898
2022-07-11 12:41:52 +00:00
Tooru Fujisawa bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Tom Ritter be3d5275d4 Bug 1772378: Move Eval checks higher to encompass JSMs r=bholley
This no longer permits wasm modules to being instatiated;
and will perform an eval check even when no csp exists,
such as for JSMs.

Differential Revision: https://phabricator.services.mozilla.com/D148141
2022-06-29 13:45:57 +00:00
Iulian Moraru 5b54549da9 Backed out changeset 6b0d5ebbdea5 (bug 1772378) for causing multiple xpcshell failures. 2022-06-28 01:47:11 +03:00
Tom Ritter fc33a9662d Bug 1772378: Move Eval checks higher to encompass JSMs r=bholley
This no longer permits wasm modules to being instatiated;
and will perform an eval check even when no csp exists,
such as for JSMs.

Differential Revision: https://phabricator.services.mozilla.com/D148141
2022-06-27 19:28:05 +00:00
Csoregi Natalia 9d7e731ba5 Backed out changeset 6085e9770cde (bug 1772378) for causing xpcshell crashes. CLOSED TREE 2022-06-27 21:47:32 +03:00
Tom Ritter eb33210657 Bug 1772378: Move Eval checks higher to encompass JSMs r=bholley
This no longer permits wasm modules to being instatiated;
and will perform an eval check even when no csp exists,
such as for JSMs.

Differential Revision: https://phabricator.services.mozilla.com/D148141
2022-06-27 17:34:12 +00:00
criss c6b2c5db61 Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell fbec8096a9 Bug 1772006 - Part 7: Simplify and move the find+replace methods from ns[T]StringObsolete, r=xpcom-reviewers,barret
The remaining methods in ns[T]StringObsolete are all find+replace methods for
nsTSubstring. These were migrated in a similar way to the find methods, and
partially updated to avoid using methods from nsStringObsolete.cpp.

This change removes the ns[T]StringObsolete.cpp files completely, as they are
no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D148301
2022-06-10 21:12:08 +00:00
Benjamin VanderSloot 5157d54b3b Bug 1765313, part 2 - Move the ShouldAllowAccessFor functions to StorageAccess.h, r=anti-tracking-reviewers,timhuang
These functions are used to check if an object or context should have storage access.
Therefore they belong in StorageAccess.h with other functions that serve this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D148285
2022-06-08 21:57:16 +00:00
Marian-Vasile Laza a0f6973887 Backed out 5 changesets (bug 1765313, bug 1770403) for causing bc failures on browser_storageAccessPrivilegeAPI.js. CLOSED TREE
Backed out changeset 22153c8641e1 (bug 1765313)
Backed out changeset 588d54f796a0 (bug 1765313)
Backed out changeset 2376ca53eb9c (bug 1765313)
Backed out changeset 9cf02ec5657a (bug 1770403)
Backed out changeset 7d8147ba25e8 (bug 1770403)
2022-06-08 22:07:37 +03:00
Benjamin VanderSloot b52e3e14a8 Bug 1765313, part 2 - Move the ShouldAllowAccessFor functions to StorageAccess.h, r=anti-tracking-reviewers,timhuang
These functions are used to check if an object or context should have storage access.
Therefore they belong in StorageAccess.h with other functions that serve this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D148285
2022-06-08 17:11:19 +00:00
Molnar Sandor 4012088f05 Backed out 5 changesets (bug 1765313, bug 1770403) for causing lint failure in tools/lint/rejected-words.yml CLOSED TREE
Backed out changeset c76671d99573 (bug 1765313)
Backed out changeset f0895e88c27e (bug 1765313)
Backed out changeset 81a0f8c40381 (bug 1765313)
Backed out changeset a11f5453e441 (bug 1770403)
Backed out changeset df452028881c (bug 1770403)
2022-06-08 15:48:57 +03:00
Benjamin VanderSloot b99dc899f7 Bug 1765313, part 2 - Move the ShouldAllowAccessFor functions to StorageAccess.h, r=anti-tracking-reviewers,timhuang
These functions are used to check if an object or context should have storage access.
Therefore they belong in StorageAccess.h with other functions that serve this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D148285
2022-06-08 12:18:22 +00:00
Sylvestre Ledru 42f6811d95 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,media-playback-reviewers,necko-reviewers,padenot,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D148375
2022-06-07 12:32:55 +00:00
Mike Conley 32c1db2b09 Bug 1354248 - Part 4: Make PageIconProtocolHandler use RemoteStreamGetter. r=necko-reviewers,nika,mak,ckerschb,kershaw
This makes it so that PageIconProtocolHandler uses RemoteStreamGetter in the event that the
privileged about content process attempts to use the page-icon: protocol. This allows the parent
to then remotely stream the favicons down to the privileged about content process.

This also adds a test to check that only the privileged about content process can use this
protocol, and that "normal" web content processes cannot.

Differential Revision: https://phabricator.services.mozilla.com/D147335
2022-06-03 15:17:34 +00:00
Rob Wu c0e20dd0b0 Bug 1770468 - Report-only wasm-unsafe-eval in MV2 r=mixedpuppy,freddyb,ckerschb
For backcompat, do not enforce wasm-unsafe-eval even if the extension
has specified a custom CSP. Do report the errors though, to allow
extension authors to discover the issue and fix it.

Differential Revision: https://phabricator.services.mozilla.com/D147105
2022-05-24 13:56:22 +00:00
Tom Schuster cf003c21f0 Bug 1740263 - Continue to allow WASM by default in Webextensions v2. r=mixedpuppy,robwu
Differential Revision: https://phabricator.services.mozilla.com/D142953
2022-05-19 14:13:51 +00:00
Tom Schuster 4525afaf9f Bug 1740263 - Implement the CSP checking callback for WASM. r=dom-worker-reviewers,smaug,freddyb
Differential Revision: https://phabricator.services.mozilla.com/D141979
2022-05-19 14:13:50 +00:00
Iulian Moraru 4d59317ca4 Backed out 6 changesets (bug 1740263) for causing bp-hybrid bustages on nsScriptSecurityManager. CLOSED TREE
Backed out changeset 2f5ec6ad0f81 (bug 1740263)
Backed out changeset a1e7766cdb94 (bug 1740263)
Backed out changeset 3978ccb95455 (bug 1740263)
Backed out changeset e34ba774b3f8 (bug 1740263)
Backed out changeset 8365b10be28e (bug 1740263)
Backed out changeset d923462c9cd0 (bug 1740263)
2022-05-19 03:28:08 +03:00
Tom Schuster 1541cb59a7 Bug 1740263 - Continue to allow WASM by default in Webextensions v2. r=mixedpuppy,robwu
Differential Revision: https://phabricator.services.mozilla.com/D142953
2022-05-18 21:39:30 +00:00
Tom Schuster 5c808859fa Bug 1740263 - Implement the CSP checking callback for WASM. r=dom-worker-reviewers,smaug,freddyb
Differential Revision: https://phabricator.services.mozilla.com/D141979
2022-05-18 21:39:29 +00:00
Mark Banner 3580687036 Bug 1766238 - Stop using the target argument for ChromeUtils.import in caps tests. r=bholley
Depends on D144559

Differential Revision: https://phabricator.services.mozilla.com/D144560
2022-04-27 08:38:34 +00:00
Nika Layzell 4fccdde58f Bug 1761511 - Part 5: Fix gtest deprecation warnings, r=ahal
The TEST_CASE_P macros are deprecated in newer versions of gtest.

Differential Revision: https://phabricator.services.mozilla.com/D142612
2022-04-14 02:09:22 +00:00
june wilde 600ce18f08 Bug 1715785 - Trim redirect chain of excess information; r=necko-reviewers,ckerschb,tjr,dragana
Differential Revision: https://phabricator.services.mozilla.com/D136885
2022-04-13 13:33:49 +00:00
Cosmin Sabou 97d21fa167 Backed out 5 changesets (bug 1761511) for causing build bustages. CLOSED TREE
Backed out changeset 687de8c00013 (bug 1761511)
Backed out changeset 88e6cf5c70e5 (bug 1761511)
Backed out changeset 4c40758f54f1 (bug 1761511)
Backed out changeset 8a18abcccda4 (bug 1761511)
Backed out changeset 1afb1f32a6a4 (bug 1761511)
2022-04-07 00:13:00 +03:00
Nika Layzell f1c3a8f87c Bug 1761511 - Part 5: Fix gtest deprecation warnings, r=ahal
The TEST_CASE_P macros are deprecated in newer versions of gtest.

Differential Revision: https://phabricator.services.mozilla.com/D142612
2022-04-06 20:45:08 +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
Leslie Orellana 4a4b8cfda1 Bug 1762498 - Fix ESLint rule warnings for no-unused-vars in caps/tests/unit/test_site_origin.js. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D142639
2022-04-01 10:21:34 +00:00
Nika Layzell 5b2b8bc288 Bug 1754320 - Re-escape existing escape sequences in precursor origins, r=ckerschb
Apparently the esc_NonASCIIOnly and esc_Forced flags to NS_EscapeURL are
incompatible, meaning that the escaping and unescaping code was not
handling existing escape sequences properly. This patch adds an explicit
gtest to make sure sequences round-trip correctly, and switches
serialization to use `esc_Query | esc_Forced` instead, which may escape
more aggressively than required but should work correctly.

Differential Revision: https://phabricator.services.mozilla.com/D142111
2022-03-28 15:12:36 +00:00
Bobby Holley ea24f9bbec Bug 1757796 - Permit midi-sysex on localhost. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D140417
2022-03-04 22:55:00 +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
Emilio Cobos Álvarez 4fe24cf7b2 Bug 1755891 - Remove unneeded include in NullPrincipal.cpp. r=cpeterson
We no longer use GkRustUtils to generate UUIDs.

Differential Revision: https://phabricator.services.mozilla.com/D139013
2022-02-17 17:51:08 +00:00
Nika Layzell ff54347f9f Bug 1753136 - Explicitly escape and unescape precursor origins in null principal queries, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D138090
2022-02-08 15:18:21 +00:00
Kershaw Chang e2611a28e9 Bug 1544127 - Make sure nsIPrincipal is only accessed on main thread, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D135681
2022-01-19 13:52:05 +00:00
Christian Holler 3782331a06 Bug 1590068 - Add fuzzing target for StructuredCloneData. r=baku,sfink
Differential Revision: https://phabricator.services.mozilla.com/D128513
2021-12-08 18:59:02 +00:00
Luca Greco 635e7a7358 Bug 1741600 - Fix ExpandedPrincipal and nsCSPContext leaks triggered by ApplyAddonContentScriptCSP. r=ckerschb,robwu
This patch is meant to be a proposed short run fix to prevent ApplyAddonContentScriptCSP
from leaking the ExpandedPrincipal and nsCSPContext instance because they keep a reference
to each other.
This patch prevent that leak by creating a clone of the ExpandedPrincipal and then use
that cloned instance in the call to nsCSPContext::SetRequestContextWithPrincipal.

Once Bug 1548468 will move the CSP off the ExpandedPrincipal class, cloning the expanded
principal to prevent that leak should not be necessary anymore.

Differential Revision: https://phabricator.services.mozilla.com/D132144
2021-11-26 15:51:13 +00:00
Tim Huang db88fe8435 Bug 1742598 - Part 1: Add an parameter to URLParams::Serialize() to indicate if the encoding is needed for the serialization result. r=smaug,necko-reviewers,dragana
The URL query stripping doesn't want the URLParams::Serialize() to
encode the result because it will encode the unstripped parameters. This
will change the unstripped parameters once stripping was happened.

Therefore, we introduce an parameter to URLParams::Serialize() to
disable encoding.

Differential Revision: https://phabricator.services.mozilla.com/D131964
2021-11-25 12:13:48 +00:00
Niklas Goegge 21b2b112f4 Bug 1724152: Replace GkRustUtils::GenerateUUID with nsID::GenerateUUID. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D129633
2021-11-04 08:55:46 +00:00
Kagami Sascha Rosylight 1d0b87199f Bug 1725942 - Part 1: Add ContentPrincipalInfoHashKey r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D126241
2021-10-19 12:01:49 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Tim Huang b3594081d0 Bug 1724376 - Part 2: Add a RejectForeignAllowList::Check() for principal. r=dimi,pbz,ckerschb
We need a helper function for checking principal if it's in the foreign
allow list.

In this patch we will add a BasePrincipal::IsURIInList() because this is
needed for RejectForeignAllowList::Check().

Differential Revision: https://phabricator.services.mozilla.com/D123804
2021-10-05 15:16:19 +00:00
Andrew McCreight f7be2ba306 Bug 1731645 - Fix non-unified build errors in caps/. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D126135
2021-09-21 15:42:01 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +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
Paul Zuehlcke a466d4aa0a Bug 1687314 - Improve behavior of GetChannelResultStoragePrincipal and StoragePrincipalHelper::Create when handling NullPrincipal. r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D122381
2021-08-17 12:51:22 +00:00
Christoph Kerschbaumer 9018e2e41f Bug 1723496: Update tests within caps/ to work with https-first enabled r=nika
Differential Revision: https://phabricator.services.mozilla.com/D121529
2021-08-12 08:39:36 +00:00
Iulian Moraru c4ff1ff63e Backed out changeset 21a7cf38f15a (bug 1725227) for causing multiple failures. CLOSED TREE 2021-08-12 12:21:05 +03:00
Tim Huang cca4bb13f7 Bug 1725227 - Fixing the issue that the port doesn't appear in the partitionKey. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D122321
2021-08-12 07:54:49 +00:00
Tom Schuster a0128c7638 Bug 1724206 - Use WebExtensionPolicy webidl definition for addonPolicy property on nsIPrincipal. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D121889
2021-08-05 18:16:17 +00:00
Paul Zuehlcke e5b57b5d4c Bug 1706292 - Do not clone principal for CookieJarSettings cookie permission check. r=timhuang,ckerschb
For every cookie permission check CookieJarSettings::CookiePermission has to create a new principal.
This is slow. It uses a cloned principal so it can strip the origin attributes which should not be
used for the permission check.
With this patch we no longer need to clone the principal. We pass in the original principal and perform
the OA stripping on an OA copy in BasePrincipal::EqualsForPermission.
Before, EqualsForPermission was guaranteed to get a content principal, because ClonePrincipalForPermission
enforced it. BasePrincipal::EqualsForPermission was refactored to account for non content principals.

Differential Revision: https://phabricator.services.mozilla.com/D120834
2021-07-30 15:01:07 +00:00
Stefan Zabka 1d98ea9a16 Bug 1719838 - Assert that OriginAttributes are pristine in PopulateFromSuffix. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120381
2021-07-21 12:10:58 +00:00
Nika Layzell 40807ad2ea Bug 1715167 - Part 7: Add tests for precursor principals, r=ckerschb,ngogge
These test various ways of loading documents which will end up with null
principals, and verify that they are loaded with the expected precursor URI.

Depends on D119693

Differential Revision: https://phabricator.services.mozilla.com/D119694
2021-07-15 21:09:16 +00:00
Nika Layzell e620d25a35 Bug 1715167 - Part 6: Use the unsandboxed result principal as precursor for sandbox principals, r=ckerschb,ngogge
This change stores a generated nsID directly on the LoadInfo, rather
than the full SandboxedLoadingPrincipal. This allows for the sandboxed
principal to be constructed from GetChannelResultPrincipal using the
unsandboxed result principal as a precursor, rather than the loading
principal.

The nsID is reset by HttpChannelBase whenever a non-internal redirect
occurs to reduce the chance of multiple null result principals during a
redirect with the same nsID, but different precursors.

Depends on D119692

Differential Revision: https://phabricator.services.mozilla.com/D119693
2021-07-15 21:09:15 +00:00
Nika Layzell 37b7c93371 Bug 1715167 - Part 5: Add a precursorPrincipal attribute to nsIPrincipal, r=ckerschb,ngogge
This provides a getter which can be used to interact with the precursor
attribute of the null principal.

Depends on D119691

Differential Revision: https://phabricator.services.mozilla.com/D119692
2021-07-15 21:09:15 +00:00
Nika Layzell 6ef5d5d817 Bug 1715167 - Part 3: Track precursor origins for URI_INHERITS_SECURITY_CONTEXT responses, r=ckerschb,ngogge
If a URI has the URI_INHERITS_SECURITY_CONTEXT flag it will not be given
a content principal by CreateContentPrincipal. This patch changes the
algorithm for creating result principals for network requests such that
the null principal created in this situation has a precursor principal
tracked on it.

Depends on D119689

Differential Revision: https://phabricator.services.mozilla.com/D119690
2021-07-15 21:09:14 +00:00
Nika Layzell 0f45db2f10 Bug 1715167 - Part 2: Track precursor origins through CreateWithInheritedAttributes, r=ckerschb,ngogge
This method will be the primary way to track the precursor for a null
principal, and will automatically handle tracking precursors in some common
cases.

While sandboxed principals are created with `CreateWithInheritedAttributes`,
they unfortunately currently use the wrong precursor principal, which will be
fixed in a later part.

Depends on D119688

Differential Revision: https://phabricator.services.mozilla.com/D119689
2021-07-15 21:09:14 +00:00
Nika Layzell 42b622269c Bug 1715167 - Part 1: Add the ability to track precursor origin on null principals, r=ckerschb
This patch only adds the machinery for tracking a precursor origin to the
principal, and does not actually track the precursor origin in any situations.
That is done in follow-up patches.

Differential Revision: https://phabricator.services.mozilla.com/D119688
2021-07-15 21:09:13 +00:00
Alexandru Michis 88d34a31f5 Backed out changeset 19de2822bc0c (bug 1711168) for causing Bug 1719063.
CLOSED TREE
2021-07-08 22:56:34 +03:00
Niklas Goegge a527e368f3 Bug 1714645: Remove NullPrincipalURI. r=ckerschb,nika
Differential Revision: https://phabricator.services.mozilla.com/D118490
2021-07-06 08:23:12 +00:00
Niklas Goegge a83ee58b03 Bug 1714645: Use nsSimpleURI instead of NullPrincipalURI. r=ckerschb,nika
Differential Revision: https://phabricator.services.mozilla.com/D118489
2021-07-06 08:23:11 +00:00
Christoph Kerschbaumer 15f7d2932c Bug 1654488: Remove pref in CheckLoadURIWIthFlags which allows all UI resources to load r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D118817
2021-06-25 17:28:59 +00:00
Paul Zuehlcke 092f0ddc7d Bug 1714065 - Allow matching partition key fields via OriginAttributesPattern. r=timhuang,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D116606
2021-06-24 09:13:30 +00:00
Shane Caraveo 7a0db3609f Bug 1711168 support extension matching in webAccessibleResources r=zombie,smaug
Differential Revision: https://phabricator.services.mozilla.com/D115114
2021-06-23 21:52:38 +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
Stefan Zabka 35d147115f Bug 1716734 - Updated comment in nsIPrincipal.idl r=ckerschb DONTBUILD
Updated the origin attributes comment to use the current delimiter

Differential Revision: https://phabricator.services.mozilla.com/D117990
2021-06-16 15:53:18 +00:00
Kris Maglione ae436f55ec Bug 1646560: Part 2 - Move allowJavascript and friends from DocShell to BrowsingContext and WindowContext. r=jdescottes,nika,geckoview-reviewers,devtools-backward-compat-reviewers,agi
This is slightly complicated by the fact that the editor code wants to be able
to set this from the content process, so we really need separate
BrowsingContext and WindowContext flags, the latter of which can be set by the
owning process.

Differential Revision: https://phabricator.services.mozilla.com/D114899
2021-06-15 04:40:11 +00:00
Andreas Farre 1f6b2e377e Part 1: Bug 1700623 - Add storagePrincipal to WindowGlobalParent. r=nika,timhuang
We use the storage principal to look up origin records in the
background session storage manager.

Differential Revision: https://phabricator.services.mozilla.com/D111428
2021-05-26 07:14:03 +00:00
Alexandru Michis 84d8f14b41 Backed out 9 changesets (bug 1700623) for causing bc failures in browser_history_menu.js
CLOSED TREE

Backed out changeset 5eae296ad8b5 (bug 1700623)
Backed out changeset 97c3add3b00a (bug 1700623)
Backed out changeset 7ab483627a27 (bug 1700623)
Backed out changeset a4e673640de5 (bug 1700623)
Backed out changeset 513ea16be430 (bug 1700623)
Backed out changeset 88b4add342df (bug 1700623)
Backed out changeset c13bdee1b526 (bug 1700623)
Backed out changeset 26df421dac02 (bug 1700623)
Backed out changeset 6cd0b7a269e5 (bug 1700623)
2021-05-21 11:43:54 +03:00
Andreas Farre e9831f3ce0 Part 1: Bug 1700623 - Add storagePrincipal to WindowGlobalParent. r=nika,timhuang
We use the storage principal to look up origin records in the
background session storage manager.

Differential Revision: https://phabricator.services.mozilla.com/D111428
2021-05-20 12:48:20 +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
Nika Layzell c2a86c631c Bug 1711078 - Part 1: Stop using the component manager to create non-system principals, r=ckerschb
This is necessary to remove the Init methods from principals, allowing
immutable fields to be marked as const and clearly separated from mutable
fields to improve threadsafety.

Differential Revision: https://phabricator.services.mozilla.com/D115091
2021-05-17 20:50:08 +00:00
Shane Caraveo c4d682be93 Bug 1697334 implement matches property in web_accessible_resources r=zombie,ckerschb,necko-reviewers,smaug
This patch implements support for the manifest V3 matches property
which limits what hosts may load an extensions web_accessible_resources.

Differential Revision: https://phabricator.services.mozilla.com/D107746
2021-05-14 03:15:15 +00:00
Christoph Kerschbaumer d6ef7be5e9 Bug 1706593: Update prePath to camel case in nsIPrincipal.idl r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D113927
2021-04-30 11:16:31 +00:00
David Parks 2b32f597cb Bug 1682030 - Remove NPAPI from tests outside of dom/plugins. r=Gijs,cmartin
Removes NPAPI plugin features from tests outside of dom/plugins.  Some tests are updated to avoid NPAPI behavior and others are deleted if they no longer offer anthing useful.

Differential Revision: https://phabricator.services.mozilla.com/D107134
2021-04-06 19:28:09 +00:00
Csoregi Natalia d68661e2cc Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks 3f9712f20f Bug 1682030 - Remove NPAPI from tests outside of dom/plugins. r=Gijs,cmartin
Removes NPAPI plugin features from tests outside of dom/plugins.  Some tests are updated to avoid NPAPI behavior and others are deleted if they no longer offer anthing useful.

Differential Revision: https://phabricator.services.mozilla.com/D107134
2021-04-05 23:48:32 +00:00
Simon Giesecke 8118f95d0d Bug 708901 - Migrate to nsTHashSet in caps. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D108590
2021-03-24 17:56:45 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke c0a557134b Bug 708901 - Migrate to nsTHashSet in caps. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D108590
2021-03-24 16:58:57 +00:00
Emilio Cobos Álvarez 7dac28d4c1 Bug 1684001 - IsURIInPrefList should be infallible. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D107455
2021-03-08 23:36:40 +00:00
Butkovits Atila d795f5b731 Backed out 2 changesets (bug 1684001) for causing failures on test_ext_webRequest_filterResponseData.js. CLOSED TREE
Backed out changeset 2396dd65ee8d (bug 1684001)
Backed out changeset 52c6a21b39fb (bug 1684001)
2021-03-09 03:10:19 +02:00
Emilio Cobos Álvarez 6aff310271 Bug 1684001 - IsURIInPrefList should be infallible. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D107455
2021-03-08 23:36:40 +00:00
Tom Schuster 801c5575e6 Bug 1696229 - Don't report wrong errors for expanded principals in CheckLoadURIWithPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D107101
2021-03-08 20:57:08 +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
Alexis Beingessner 07f2f659c6 Bug 1686616 - make StringBundle use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105531
2021-02-18 13:26:32 +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
Christoph Kerschbaumer 6cdf7289fa Bug 1690942: Ensure CheckLoadURIWithPrincipalFromJS does not crash when receiving nullptr principal r=dveditz
Differential Revision: https://phabricator.services.mozilla.com/D104161
2021-02-11 13:02:20 +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
Kris Maglione b92138146b Bug 1685801: Part 12 - Remove BrowserUtils.urlSecurityCheck. r=mccr8
This moves the exception prettifying to the script security manager for all JS
callers, where it is much cheaper and more consistently applied.

Differential Revision: https://phabricator.services.mozilla.com/D101492
2021-01-28 20:58:48 +00:00
Kris Maglione 9ab2b48df3 Bug 1685801: Part 3 - Remove BrowserUtils.makeURI and makeFileURI. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101483
2021-01-28 20:58:24 +00:00
Mihai Alexandru Michis 040e2ea5d0 Backed out 12 changesets (bug 1685801) for causing bc failures in browser_ctrlTab.js
CLOSED TREE

Backed out changeset 021924b62f13 (bug 1685801)
Backed out changeset 38cc10101c1f (bug 1685801)
Backed out changeset 9ab9574ac72a (bug 1685801)
Backed out changeset 1a7f259cc2ec (bug 1685801)
Backed out changeset b267b19a7f6e (bug 1685801)
Backed out changeset 7dfcf0257487 (bug 1685801)
Backed out changeset ee0d0169b079 (bug 1685801)
Backed out changeset 0c358ee51951 (bug 1685801)
Backed out changeset 338ab91af557 (bug 1685801)
Backed out changeset a49415007aaf (bug 1685801)
Backed out changeset b91098299143 (bug 1685801)
Backed out changeset edf6209861a8 (bug 1685801)
2021-01-28 22:55:11 +02:00
Kris Maglione 205b99c744 Bug 1685801: Part 12 - Remove BrowserUtils.urlSecurityCheck. r=mccr8
This moves the exception prettifying to the script security manager for all JS
callers, where it is much cheaper and more consistently applied.

Differential Revision: https://phabricator.services.mozilla.com/D101492
2021-01-28 05:25:15 +00:00
Kris Maglione d7b8eeedcc Bug 1685801: Part 3 - Remove BrowserUtils.makeURI and makeFileURI. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101483
2021-01-28 05:25:10 +00:00
Butkovits Atila 7decdccbdc Backed out 12 changesets (bug 1685801) for causing failures on browser_fission_maxOrigins.js. CLOSED TREE
Backed out changeset 0d7153110519 (bug 1685801)
Backed out changeset 5175062925c7 (bug 1685801)
Backed out changeset 2c1250e786f0 (bug 1685801)
Backed out changeset 0ce3c773ba74 (bug 1685801)
Backed out changeset 9d51c6e24dee (bug 1685801)
Backed out changeset 3f4dc6349441 (bug 1685801)
Backed out changeset a80de9abb9f8 (bug 1685801)
Backed out changeset 30786893a5e7 (bug 1685801)
Backed out changeset 8007b12d6e32 (bug 1685801)
Backed out changeset fa814f4b7125 (bug 1685801)
Backed out changeset 14e4e47ee99f (bug 1685801)
Backed out changeset d9f1feba9454 (bug 1685801)
2021-01-28 07:15:59 +02:00
Kris Maglione fa906b07e7 Bug 1685801: Part 12 - Remove BrowserUtils.urlSecurityCheck. r=mccr8
This moves the exception prettifying to the script security manager for all JS
callers, where it is much cheaper and more consistently applied.

Differential Revision: https://phabricator.services.mozilla.com/D101492
2021-01-28 03:33:09 +00:00
Kris Maglione 70ccb5bca1 Bug 1685801: Part 3 - Remove BrowserUtils.makeURI and makeFileURI. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101483
2021-01-28 03:32:33 +00:00
Shane Caraveo 6a2b434485 Bug 1594234 remove extensions.content_script_csp preferences in favor of extensions.manifestV3.enabled r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D101212
2021-01-19 19:43:09 +00:00
Shane Caraveo 98c9307c72 Bug 1594234 manifest v3 content security validation improvements r=robwu,geckoview-reviewers,agi
This patch adds CSP validation for manifest v3 changes when parsing the addon manifest.

Differential Revision: https://phabricator.services.mozilla.com/D100720
2021-01-19 19:42:41 +00:00
Shane Caraveo 4a14410028 Bug 1594234 manifest v3 content security policy support r=robwu,geckoview-reviewers,agi
Implement manifest v3 CSP that is compatible with the current chrome implementation.

Support for content_security_policy.isolated_world (a.k.a. content_security_policy.content_scripts)
has been removed for consistency with
345390adf6%5E%21/

Differential Revision: https://phabricator.services.mozilla.com/D100573
2021-01-07 14:53:18 +00:00
Frederik Braun c1fa7a9762 Bug 1687315 - fix testoriginattributes tests r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D102205
2021-01-19 07:54:31 +00:00
Simon Giesecke 9758d919eb Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-17 14:58:18 +00:00
Csoregi Natalia d8c9489b13 Backed out changeset 16d174e7c342 (bug 1583109) for bustage on nsReadableUtils.h. CLOSED TREE 2020-12-16 22:51:26 +02:00
Simon Giesecke 72babae175 Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-16 19:38:23 +00:00
Kartik Gautam f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Dorel Luca 7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Simon Giesecke 5db2472bdf Bug 1673931 - Avoid including ReferrerPolicyBinding.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97610
2020-12-10 11:09:29 +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 94b0165df6 Bug 1678374 - Avoid including js/RootingAPI.h from header files. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D97616

Depends on D97467
2020-11-23 16:12:12 +00:00
Simon Giesecke 1000a339cf Bug 1673931 - Avoid including ChromeUtils.h from header files.
Differential Revision: https://phabricator.services.mozilla.com/D96553

Depends on D96552
2020-11-23 16:10:16 +00:00
Simon Giesecke a1126d1532 Bug 1676362 - Removed unused includes from nsJSPrincipals.h. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D96545

Depends on D96543
2020-11-23 16:09:37 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Peter Van der Beken ea7daa934e Bug 1677483 - Reenable some tests that are now succeeding with Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97267
2020-11-17 10:25:51 +00:00
Mihai Alexandru Michis d06ca5f7d1 Backed out changeset e4b67fc1f101 (bug 1677483) for causing multiple mochitest plain failures.
CLOSED TREE
2020-11-17 19:29:26 +02:00
Peter Van der Beken 75190a1035 Bug 1677483 - Reenable some tests that are now succeeding with Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97267
2020-11-17 10:25:51 +00:00
Jan Varga 4a6e04dc62 Bug 1676411 - Fix usage calculation for file:// (and potentially other) URIs; r=asuth,dom-workers-and-storage-reviewers
This patch improves the required consistency between GetStorageOriginKey and
GetLocalStorageQuotaKey.

Differential Revision: https://phabricator.services.mozilla.com/D96583
2020-11-13 19:51:08 +00:00
Simon Giesecke f355f05fec Bug 1673682 - Accept functors rather than a virtual function override in URLParams::Parse. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96428
2020-11-13 08:12:12 +00:00
Simon Giesecke 6206951895 Bug 1673682 - Move URLParams to nsURLHelper.h. r=valentin,necko-reviewers
Move ReadStructuredClone/WriteStructuredClone to URLSearchParams.

Adapt all uses of URLParams.

Differential Revision: https://phabricator.services.mozilla.com/D96416
2020-11-13 08:11:32 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Tim Huang 18853bea78 Bug 1670617 - Part 2: Make the CORS preflight cache partitioned by the originAttributes. r=ckerschb,necko-reviewers
We want to partition the CORS preflight cache by the network state
partitioning. So, we have done two things in the patch. First, we make
the CORS preflight cache to be aware of the OriginAttributes. Second, we
use the originAttributes of the network state partitioning in the CORS
preflight cache. As the result, the CORS preflight cache will be
partitioned by the originAttributes.partitionKey as well as other
originAttributes fields if present.

Differential Revision: https://phabricator.services.mozilla.com/D93683
2020-10-26 13:39:12 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Marco Bonardo 1019bbf009 Bug 1626016 - Remove createFixupURI and move postData inside URIFixupInfo. r=Gijs,geckoview-reviewers,preferences-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D93189
2020-10-13 10:20:16 +00:00
Olli Pettay 8a508eaa66 Bug 1668357 - Disable tests which fail when fission and session-history-in-parent are enabled, r=peterv,marionette-reviewers,whimboo
In many cases with wpt, most of the tests in the file pass, but it is rather time consuming to annotate
.ini files case by case.

Differential Revision: https://phabricator.services.mozilla.com/D91977
2020-10-01 10:23:47 +00:00
Emilio Cobos Álvarez d0c1406073 Bug 1667438 - Simplify OriginAttributes::operator==. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D91458
2020-09-25 19:24:29 +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
Andrea Marchesini 60b6161a74 Bug 1635828 - Isolate HSTS per first-party when privacy.partition.network_state is set to true - part 3 - partition key, r=xeonchen
Differential Revision: https://phabricator.services.mozilla.com/D83316
2020-09-20 20:51:12 +00:00
Narcis Beleuzu 4a31045523 Backed out 4 changesets (bug 1635828) for causing Bug 1666083
Backed out changeset 1f93614c3fde (bug 1635828)
Backed out changeset 04a8f6581dde (bug 1635828)
Backed out changeset 1bfeca8427e6 (bug 1635828)
Backed out changeset 8ec4db600c1f (bug 1635828)
2020-09-20 20:00:45 +03:00
Andrea Marchesini 487589caae Bug 1635828 - Isolate HSTS per first-party when privacy.partition.network_state is set to true - part 3 - partition key, r=xeonchen
Differential Revision: https://phabricator.services.mozilla.com/D83316
2020-09-16 14:33:31 +00:00