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

373 Коммитов

Автор SHA1 Сообщение Дата
Andrew Sutherland 6736ecda3b Bug 1503072 - Add mitigation to bypass SW on navigation fault. r=dom-worker-reviewers,necko-reviewers,valentin,edenchuang
We enable this mitigation by default because:
- The alternate UX is about:blank or corrupted content.  That's never good.
- We want to make sure that our test coverage handles this mitigation because
  it's want we want to ship.

However, we do explicitly disable it for all ServiceWorker WPT's via
`__dir__.ini` directive at the root of the service-workers test tree.

This is motivated by the
`/service-workers/service-worker/update-recovery.https.html` test which
intentionally tests a broken ServiceWorker being able to be updated.  It
explicitly tests that the intercepted broken iframe shouldn't successfully
load, but our mitigation makes it load, which breaks the test.

Depends on D111845

Differential Revision: https://phabricator.services.mozilla.com/D111993
2021-07-12 21:10:26 +00:00
Iulian Moraru ef7b6b88df Backed out 3 changesets (bug 1503072) for causing bc failures on browser_navigation_fetch_fault_handling.js. CLOSED TREE
Backed out changeset f8c6503512f5 (bug 1503072)
Backed out changeset c04927c15fd8 (bug 1503072)
Backed out changeset b7550232d4f1 (bug 1503072)
2021-07-12 15:19:09 +03:00
Andrew Sutherland bd86df06b4 Bug 1503072 - Add mitigation to bypass SW on navigation fault. r=dom-worker-reviewers,necko-reviewers,valentin,edenchuang
We enable this mitigation by default because:
- The alternate UX is about:blank or corrupted content.  That's never good.
- We want to make sure that our test coverage handles this mitigation because
  it's want we want to ship.

However, we do explicitly disable it for all ServiceWorker WPT's via
`__dir__.ini` directive at the root of the service-workers test tree.

This is motivated by the
`/service-workers/service-worker/update-recovery.https.html` test which
intentionally tests a broken ServiceWorker being able to be updated.  It
explicitly tests that the intercepted broken iframe shouldn't successfully
load, but our mitigation makes it load, which breaks the test.

Depends on D111845

Differential Revision: https://phabricator.services.mozilla.com/D111993
2021-07-12 11:13:35 +00:00
Nika Layzell 1aaeb179e2 Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117103
2021-06-09 04:56:48 +00:00
Eden Chuang 0447732333 Bug 1584007 - check ClientSource existence r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D85362
2021-05-24 13:55:08 +00:00
Eden Chuang e1283fcd46 Bug 1584007 - FutureClientSourceParent should keep ClientManagerService alive r=asuth
The strong reference will be dropped when FutureClientSourceParent is removed,
and we guarantee that all FutureClientSourceParents will either be removed or
replaced with a ClientSourceParent (or at least this is a guarantee that's
supposed to be true).

Differential Revision: https://phabricator.services.mozilla.com/D68041
2021-05-24 13:55:07 +00:00
Eden Chuang 3e3456e73e Bug 1584007 - let ClientChannelHelperParent manage FutureClientSourceParent lifetime r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
ClientChannelHelperParent is the thing creating the ClientInfos which aren't
backed by existing ClientSources, so it may make sense for CCHP to tell the
ClientManagerService (CMS) to "expect" or "forget" a "future"
ClientSource(Parent).

When such a ClientInfo is created, CCHP notifies the CMS that a future
ClientSource may be created. This notification has to be observed before any
ClientHandles try to query CMS to a ClientSourceParent, which is the case
because the notification as well as ClientHandleParent constructors occur over
PBackground, and the notification sending method is called first.

CMS is told to forget the future ClientSource whenever a redirect occurs that
would result in the creation of a new ClientSource (i.e. a new ClientInfo). It's
also possible that the ClientInfo's LoadInfo's channel is cancelled. To account
for this, CHCP stores the most recent ClientInfo it's created and tells CMS
to _possibly_ forget the associated future ClientSource in its destructor. It's
possible that the channel completed its load, in which case this notification
is a no-op. This also relies on CHCP being destroyed after the reserved
ClientSource has a chance to both be created and register its
ClientSourceParent.

Differential Revision: https://phabricator.services.mozilla.com/D66529
2021-05-24 13:55:07 +00:00
Eden Chuang 9ca5730156 Bug 1584007 - allow ClientManager to register "future" ClientSources r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66520
2021-05-24 13:55:06 +00:00
Eden Chuang 2ed195d384 Bug 1584007 - let ClientHandleParents wait on FutureClientSourceParents r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66154
2021-05-24 13:55:06 +00:00
Eden Chuang 883943e462 Bug 1584007 - let ClientManagerService store FutureClientSourceParent r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
The changes only make it possible for ClientManagerService to store
FutureClientSourceParents, but it will not actually store them until
following changesets.

Differential Revision: https://phabricator.services.mozilla.com/D66145
2021-05-24 13:55:06 +00:00
Eden Chuang e48c6ff8ce Bug 1584007 - initial implementation of FutureClientSourceParent r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
Also implements SourceTableEntry and nsIDHasher to switch ClientManagerService's
nsDataHashTable to a mozilla::HashMap<nsID, SourceTableEntry> in following
changesets.

Differential Revision: https://phabricator.services.mozilla.com/D66144
2021-05-24 13:55:05 +00:00
Emilio Cobos Álvarez 5e03d6a488 Bug 1704651 - Wait for the right load in ClientOpenWindow. r=asuth
With fission+BFCache, we get a notification for the initial document,
and that fails the same-origin check (because about:blank isn't
same-origin with the opener) so we resolve the promise with null
rather than returning a client.

Instead, wait for the right load to arrive if the top level window
global is the initial document.

Differential Revision: https://phabricator.services.mozilla.com/D112072
2021-04-16 23:38:42 +00:00
Butkovits Atila a8051422a4 Backed out changeset b099dbba4587 (bug 1704651) for causing leackcheck failures. CLOSED TREE 2021-04-15 18:49:25 +03:00
Emilio Cobos Álvarez 0677a9ec85 Bug 1704651 - Wait for the right load in ClientOpenWindow. r=asuth
With fission+BFCache, we get a notification for the initial document,
and that fails the same-origin check (because about:blank isn't
same-origin with the opener) so we resolve the promise with null
rather than returning a client.

Instead, wait for the right load to arrive if the top level window
global is the initial document.

Differential Revision: https://phabricator.services.mozilla.com/D112072
2021-04-15 12:11:02 +00:00
Nika Layzell 27ff2d45df Bug 1697927 - Part 1: Only expose HadOriginalOpener on BrowsingContext, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D108860
2021-03-18 16:15:17 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Chris Peterson 2d4ca059e8 Bug 1691889 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/. r=peterv
The MOZ_MUST_USE macro is defined as clang's and gcc's nonstandard __attribute__((warn_unused_result)). Now that we compile as C++17 by default (bug 1560664), we can replace MOZ_MUST_USE with C++17's standard [[nodiscard]] attribute.

The [[nodiscard]] attribute must precede a function declaration's declaration specifiers (like static, extern, inline, or virtual). The __attribute__((warn_unused_result)) attribute does not have this order restriction.

Differential Revision: https://phabricator.services.mozilla.com/D107355
2021-03-10 08:19:25 +00:00
Simon Giesecke 8ecfb38a41 Bug 1691913 - Remove uses of nsDataHashtable::GetValue. r=xpcom-reviewers,necko-reviewers,dragana,nika
GetValue is going to be removed in a subsequent patch. It is no longer needed,
because it can be replaced by functions already provided by nsBaseHashtable,
in particular Lookup and Contains.

Also, its name was confusing, since it specifically returns a pointer that
allows and is intended for modifying the entry within the hashtable, rather
than returning by-value. According to the naming rules to be set on
nsBaseHashtable, it would also needed to be renamed to "Lookup*. Removing
its uses saves this effort.

Differential Revision: https://phabricator.services.mozilla.com/D105476
2021-03-01 09:59:30 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Simon Giesecke ba07b1d2f5 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/clients. r=janv
Differential Revision: https://phabricator.services.mozilla.com/D104231
2021-02-09 18:19:45 +00:00
Nika Layzell 86a03e6701 Bug 1689147 - Part 5: Change comparable to an extended attribute, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103370
2021-02-09 16:50:23 +00:00
Yaron Tausky 0afb6e885f Bug 1496997 - Remove child intercept code from dom/clients r=asuth,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D101028
2021-01-25 22:49:49 +00:00
Simon Giesecke 4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke ae75be244a Bug 1677466 - Split Endpoint.h and ProtocolMessageUtils.h from ProtocolUtils.h. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D93568

Depends on D93567
2020-11-23 16:06:42 +00:00
Simon Giesecke 31d9321c57 Bug 1660470 - Avoid including BindingIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93556

Depends on D93555
2020-11-23 16:05:44 +00:00
Simon Giesecke 252f99be51 Bug 1660470 - Avoid including ErrorIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93243

Depends on D93242
2020-11-23 16:04:28 +00:00
Simon Giesecke 40fc78c788 Bug 1660470 - Avoid including ClientIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93241

Depends on D93240
2020-11-23 16:04:17 +00:00
Simon Giesecke 1ffd69fbb6 Bug 1660470 - Avoid including DocShellMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93239

Depends on D93238
2020-11-23 16:04:08 +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
Simon Giesecke 8953086494 Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97075
2020-11-23 15:49:14 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +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
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
Simon Giesecke f70bfd33ed Bug 1626555 - Make `dom/localstorage` buildable outside of `unified-build` environment. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D94034
2020-10-21 13:17:18 +00:00
Andi-Bogdan Postelnicu 4d162f7eef Bug 1671641 - Make `dom/clients` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93793
2020-10-21 08:00:15 +00:00
Jens Stutte 1da54e31c6 Bug 1544522: Add explicit error handling to SnapshotState r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D91118
2020-10-21 08:58:23 +00:00
Christoph Kerschbaumer faf05f7d19 Bug 1552168: Remove pref security.data_uri.unique_opaque_origin. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92087
2020-10-08 16:55:25 +00:00
Nika Layzell 3feec09438 Bug 1664542 - Part 1: Fix client.openWindow/COOP+COEP crash, r=asuth
This crash is caused by the mWebProgress field of BrowsingContext being cleared
due to Cross-Origin-Opener-Policy replacing the context on navigation. By
tracking the BrowserId of the opening tab rather than the specific
BrowsingContext, this issue can be avoided.

Differential Revision: https://phabricator.services.mozilla.com/D90623
2020-09-24 16:34:26 +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
Sebastian Streich fb1d1dc1df Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

***
Fix triggeringSandboxflags passing

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-07-29 11:43:23 +00:00
Simon Giesecke 548e423dad Bug 1654469 - Stop generating operator==/operator != for IPDL structs/unions by default. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D84485
2020-07-22 17:24:33 +00:00
Liang-Heng Chen 470d1dde92 Bug 1652275 - consider partitioning case in the assertion; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D83303
2020-07-13 15:05:05 +00:00