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

1099 Коммитов

Автор SHA1 Сообщение Дата
ssummar 51c0ff21e5 Bug 1626517 - Replaced mozilla::Unused with mozilla::Ignore in mozilla::Decoder/mozilla::Encoder calls. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D129022
2021-10-25 12:31:41 +00:00
msub2 d7037d2ab2 Bug 1726734 - Replace deprecated octal sequences to satisfy ESLint no-octal-rule. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128684
2021-10-18 14:37:04 +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
Christoph Kerschbaumer bad4dac880 Bug 1735973: Update tests within dom/ to be compliant with https-first r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D128578
2021-10-18 07:41:07 +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
Matthew Gaudet 3bcfc27cef Bug 1730589 - Initial Implementation of ReadableStreams using WebIDL and DOM technologies r=smaug
This patch begins re-implements ReadableStreams using WebIDL and DOM technology (vs the existing JS streams implementation).   Some more background is [here](https://docs.google.com/document/d/1MWRkF32KV60ngOY-Ip4PnKbCMvl6VK_Y9QLED8MJJxg/edit#)

This is guarded under a configure flag `--enable-dom-streams`

1. ByteStreams and ReadableStream.tee will come in future patches.
2. I intentionally crash in other parts of the DOM that require streams (Fetch, Response, Blob), until the integration work is done in future patches.

   My current plan for that integration doesn't involve re-creating the alternative 'external streams' API from SpiderMonkey's implementation, but I have yet to do enough development to verify that will work.

Differential Revision: https://phabricator.services.mozilla.com/D122643
2021-10-06 18:43:01 +00:00
Mark Banner c24876807d Bug 1730166 - Add an await to test_ipc_messagemanager_blob.js to ensure the test runs to expected completion. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D125202
2021-09-27 16:44:57 +00:00
Kagami Sascha Rosylight eddf271c1f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 10:54:11 +00:00
Iulian Moraru a16afaadfe Backed out changeset d21b3f88a2b4 (bug 1726648) for causing build bustages. CLOSED TREE 2021-08-23 04:12:02 +03:00
Kagami Sascha Rosylight 0c5086660f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 00:35:40 +00:00
Andi-Bogdan Postelnicu 250fa0d795 Bug 1725145 - header files fixes in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122343
2021-08-22 10:21:55 +00:00
Valentin Gosu d97def2f41 Bug 1722925 - Remove NS_MutatorMethod in favor of templated nsIURIMutator::Apply r=necko-reviewers,kershaw
This basically reverts the changes in 5caa81103c00 (bug 1435671). In that bug
we switched from having a templated method to using a templated function
that returned a lambda because the templated method caused a binary size
regression on windows (MSVC). Since Firefox 67 we no longer support MSVC.
Using a lambda also required capturing the arguments by value, so it was
slightly inefficient.

This patch removes NS_MutatorMethod and makes the Apply method a template.
This improves perfomance as we can just pass the arguments to the called
function, without worrying about needing to copy them.
Since MSVC is not supported anymore, and clang and gcc didn't report a
binary size regression, this is a much better solution.

Differential Revision: https://phabricator.services.mozilla.com/D122081
2021-08-12 07:40:58 +00:00
Iulian Moraru 32090542c0 Backed out 2 changesets (bug 1722925) for causing reftest failures in color_quads. CLOSED TREE
Backed out changeset 95a6eacbef27 (bug 1722925)
Backed out changeset 2e2a98aeca5c (bug 1722925)
2021-08-12 12:22:34 +03:00
Valentin Gosu c6b1fa7e03 Bug 1722925 - Remove NS_MutatorMethod in favor of templated nsIURIMutator::Apply r=necko-reviewers,kershaw
This basically reverts the changes in 5caa81103c00 (bug 1435671). In that bug
we switched from having a templated method to using a templated function
that returned a lambda because the templated method caused a binary size
regression on windows (MSVC). Since Firefox 67 we no longer support MSVC.
Using a lambda also required capturing the arguments by value, so it was
slightly inefficient.

This patch removes NS_MutatorMethod and makes the Apply method a template.
This improves perfomance as we can just pass the arguments to the called
function, without worrying about needing to copy them.
Since MSVC is not supported anymore, and clang and gcc didn't report a
binary size regression, this is a much better solution.

Differential Revision: https://phabricator.services.mozilla.com/D122081
2021-08-12 07:40:58 +00:00
Kagami Sascha Rosylight 87f7274763 Bug 1723050 - Part 11: Replace typedef by using in dom/file/ r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D121308
2021-08-06 22:02:59 +00:00
Kashav Madan 5781dca888 Bug 1720688 - Support extended attribute syntax in protocol declarations, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119975
2021-07-22 02:24:43 +00:00
Nika Layzell e89956fbff Bug 1719184 - Transmit blob URLs more accurately when loading, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D119539
2021-07-12 20:56:04 +00:00
Dana Keeler 02ed64358a Bug 1689191 - restrict nsISiteSecurityService and DataStorage to the main process r=rmf,necko-reviewers,ipc-reviewers,kershaw,nika
Bug 1215723 introduced a mechanism whereby DataStorage data would be propagated
to content processes to avoid the IPC calls involved in querying if hosts were
HSTS. With a low number of content processes, this was a reasonable approach.
However, with Fission and the proliferation of content processes, propagating
changes in DataStorage data to every content process wakes up unrelated
processes and is inefficient. This patch restores the behavior that
nsISiteSecurityService and DataStorage is not available to content processes.
Additionally, bug 1626076 made it possible to use DataStorage directly from the
socket process. However, as of bug 1650356, this is no longer necessary, so
this patch removes that behavior as well.

Differential Revision: https://phabricator.services.mozilla.com/D118207
2021-06-24 23:39:52 +00:00
Kris Maglione b3c34d273e Bug 1646560: Part 1 - Move some XPCShell content helpers to generic shared module. r=nika
They were originally written for the extension framework, but have been used
more and more widely ever since.

Differential Revision: https://phabricator.services.mozilla.com/D114898
2021-06-15 04:40:10 +00:00
Peter Van der Beken f206ae96e4 Bug 1712725 - Stop clearing JS things when calling mozilla::DropJSObjects. r=mccr8
There's a pattern of clearing JS things when calling mozilla::DropJSObjects,
but mozilla::DropJSObjects already clears the JS things itself by calling
CycleCollectedJSRuntime::RemoveJSHolder.

Differential Revision: https://phabricator.services.mozilla.com/D115885
2021-05-27 08:35:40 +00:00
Kris Wright 5e37146c9f Bug 1692068 - Disable broken crashtests on tsan. r=necko-reviewers,decoder,dragana
These tests either cause frequent or permanent failures on TSan.

Differential Revision: https://phabricator.services.mozilla.com/D110371
2021-05-25 01:15:49 +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
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +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
Simon Giesecke 16dbe9ffec Bug 1696348 - Remove redundant nullptr checks of return value of infallible new in dom/[file,xhr]. r=baku
Depends on D107179

Differential Revision: https://phabricator.services.mozilla.com/D107180
2021-03-04 17:46:55 +00:00
Simon Giesecke c6ace2f153 Bug 1673931 - Avoid including BindingDeclarations.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97612
2021-03-04 14:32:14 +00:00
Simon Giesecke e677f7c48d Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in dom/file. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D106108
2021-03-01 09:59:33 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
smolnar 1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke 3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Tom Schuster 44ff017837 Bug 1686441 - Add a console warning when blob URL partitioning is applied. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D104813
2021-02-12 15:40:56 +00:00
Nika Layzell 45950b004a Bug 1681529 - Part 2: Use an overload set instead of template for RemoteLazyInputStreamParent::Create, r=baku
In a later part of this patch series, this will be necessary to handle cases
when BackgroundParentImpl* (or other PBackgroundParent subclasses) are passed to
RemoteLazyInputStreamParent::Create, as previously this would've caused an
undefined linker symbol error. By using an explicit overload set, we can move
the subclass conversion to the caller, and avoid this issue.

Differential Revision: https://phabricator.services.mozilla.com/D101801
2021-02-04 18:12:54 +00:00
Bogdan Tara abc7c8eeee Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE
Backed out changeset c87d0f32d7a6 (bug 1681529)
Backed out changeset b1269f35d525 (bug 1681529)
Backed out changeset 29df8d4c984a (bug 1681529)
Backed out changeset 4def7578ced0 (bug 1681529)
Backed out changeset ce57c5a26c25 (bug 1681529)
Backed out changeset 78b186ec645a (bug 1681529)
Backed out changeset b1d1550a66ca (bug 1681529)
Backed out changeset e8620622208a (bug 1681529)
Backed out changeset 636b1a7c13e4 (bug 1681529)
Backed out changeset a5a8eac68b87 (bug 1681529)
Backed out changeset 968e17db71df (bug 1681529)
2021-02-03 09:29:38 +02:00
Nika Layzell 486adc6dbc Bug 1681529 - Part 2: Use an overload set instead of template for RemoteLazyInputStreamParent::Create, r=baku
In a later part of this patch series, this will be necessary to handle cases
when BackgroundParentImpl* (or other PBackgroundParent subclasses) are passed to
RemoteLazyInputStreamParent::Create, as previously this would've caused an
undefined linker symbol error. By using an explicit overload set, we can move
the subclass conversion to the caller, and avoid this issue.

Differential Revision: https://phabricator.services.mozilla.com/D101801
2021-02-02 23:26:18 +00:00
Brindusan Cristian cbdb020883 Backed out 11 changesets (bug 1681529) for mochitest failures at test_reload_large_postdata.html. CLOSED TREE
Backed out changeset f1f988155c82 (bug 1681529)
Backed out changeset f0ba367de05e (bug 1681529)
Backed out changeset dbea9952ec79 (bug 1681529)
Backed out changeset 6e185ec2c4a4 (bug 1681529)
Backed out changeset d0b11c08666a (bug 1681529)
Backed out changeset f2515096b378 (bug 1681529)
Backed out changeset ecd8c3b8fdb4 (bug 1681529)
Backed out changeset 7ea2e9cc8bad (bug 1681529)
Backed out changeset dbc85d0bffaf (bug 1681529)
Backed out changeset f0893f544219 (bug 1681529)
Backed out changeset 91979e21aa8e (bug 1681529)
2021-02-02 22:02:59 +02:00
Nika Layzell 777a09765f Bug 1681529 - Part 2: Use an overload set instead of template for RemoteLazyInputStreamParent::Create, r=baku
In a later part of this patch series, this will be necessary to handle cases
when BackgroundParentImpl* (or other PBackgroundParent subclasses) are passed to
RemoteLazyInputStreamParent::Create, as previously this would've caused an
undefined linker symbol error. By using an explicit overload set, we can move
the subclass conversion to the caller, and avoid this issue.

Differential Revision: https://phabricator.services.mozilla.com/D101801
2021-01-27 21:55:07 +00:00
Csoregi Natalia d97e4efd8e Backed out 9 changesets (bug 1681529) for causing bustage on TestSeekableStreamWrapper.cpp. CLOSED TREE
Backed out changeset 99d1c9682dc2 (bug 1681529)
Backed out changeset b562b6038855 (bug 1681529)
Backed out changeset 5a5f514a6cfe (bug 1681529)
Backed out changeset ceb55436928a (bug 1681529)
Backed out changeset 9852de883959 (bug 1681529)
Backed out changeset 1a33ea8b533d (bug 1681529)
Backed out changeset 3385635e9521 (bug 1681529)
Backed out changeset 49c28bfc4da4 (bug 1681529)
Backed out changeset 43cc14af229d (bug 1681529)
2021-01-25 23:40:44 +02:00
Nika Layzell a77bae48a4 Bug 1681529 - Part 2: Use an overload set instead of template for RemoteLazyInputStreamParent::Create, r=baku
In a later part of this patch series, this will be necessary to handle cases
when BackgroundParentImpl* (or other PBackgroundParent subclasses) are passed to
RemoteLazyInputStreamParent::Create, as previously this would've caused an
undefined linker symbol error. By using an explicit overload set, we can move
the subclass conversion to the caller, and avoid this issue.

Differential Revision: https://phabricator.services.mozilla.com/D101801
2021-01-20 16:21:56 +00:00
Kris Maglione 4455a70039 Bug 1676490: Fix some confusing `NS_WARN_IF`s in non-failure cases. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D96622
2021-01-08 20:15:36 +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 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
Karl Tomlinson 88c7f3ad66 Bug 1119956 derive from DiscardableRunnable instead of CancelableRunnable when Cancel() is not supported r=asuth,sg
Differential Revision: https://phabricator.services.mozilla.com/D98118
2020-12-03 09:04:44 +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 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 be69bdee9a Bug 1676373 - Avoid unnecessary includes in FileList.h. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D96554

Depends on D96553
2020-11-23 16:10:21 +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 5b3084384e Bug 1660470 - Move void_t/null_t to a new IPCCore.h header. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93546

Depends on D93544
2020-11-23 16:05:20 +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
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
Andi-Bogdan Postelnicu d001328cc5 Bug 1671641 - Make `dom/file` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D94082
2020-10-22 06:32:40 +00:00
Dorel Luca bdc3f86e85 Backed out changeset 1de121cdb483 (bug 1671641) for build bustage in dom/file/ipc/RemoteLazyInputStreamThread.cpp. CLOSED TREE 2020-10-22 07:46:54 +03:00
Andi-Bogdan Postelnicu 83bf4bc5a3 Bug 1671641 - Make `dom/file` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D94082
2020-10-21 20:58:07 +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
Valentin Gosu cf8a03778f Bug 1589337 - Use nsIClassInfoImpl in nsSimpleURI and children r=necko-reviewers,kershaw,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D90257
2020-09-29 11:41: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
Christoph Kerschbaumer c9b352a0f3 Bug 1666751: Use simple and never failing LoadInfo() getter because all channels should have a loadinfo r=freddyb,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D91119
2020-09-23 12:49:40 +00:00
Chris Peterson f11ae60d32 Bug 1662964 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/file. r=baku
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.

Differential Revision: https://phabricator.services.mozilla.com/D89237
2020-09-08 15:15:19 +00:00
Tom Schuster 6dec9a2c02 Bug 1660636 - Use download attribute filename instead of File.name. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D88571
2020-09-08 19:56:52 +00:00
Simon Giesecke 55a58f0a61 Bug 847347 - Ensure that FileReader::GetAsDataURL does not trigger a release-mode assertion failure on large files. r=jstutte,froydnj
We avoid going through Substring which imposes a limit on the string length of
INT32_MAX and failing a MOZ_RELEASE_ASSERT otherwise.

This adds a new `Base64EncodeAppend` function that takes 8-bit char input and
produces 16-bit char output, and appends to an existing string, which is what
we need here to avoid doing a large copy. Base64EncodeHelper is generalized
to accomodate for that.

So in addition to fixing the defect, this also optimizes performance and
memory usage.

Differential Revision: https://phabricator.services.mozilla.com/D87413
2020-08-19 08:11:42 +00:00
Tom Schuster 9e497a23ce Bug 1650607 - Do not replace / with : in File constructor. r=baku
Basically a backout of https://hg.mozilla.org/mozilla-central/rev/1857e763332c.
Pending spec change: https://github.com/w3c/FileAPI/issues/41

Differential Revision: https://phabricator.services.mozilla.com/D86981
2020-08-17 09:52:14 +00:00
Andrea Marchesini 5fa9480158 Bug 1658878 - Isolate BlobURLs per agent-cluster - cleanup remove method, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87059
2020-08-17 09:57:04 +00:00
Andrea Marchesini 6b8618a091 Bug 1658878 - Isolate BlobURLs per agent-cluster - pref, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86968
2020-08-17 09:55:56 +00:00
Andrea Marchesini 2a7a7cfe86 Bug 1658878 - Isolate BlobURLs per agent-cluster - tests, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86915
2020-08-17 09:55:32 +00:00
Andrea Marchesini 27d564c279 Bug 1658878 - Isolate BlobURLs per agent-cluster, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86914
2020-08-14 19:45:52 +00:00
Bogdan Tara 694be205aa Backed out 4 changesets (bug 1658878) for blob related leaks CLOSED TREE
Backed out changeset 0288ef9ab65b (bug 1658878)
Backed out changeset a5af0e097560 (bug 1658878)
Backed out changeset 33c4b81f99a1 (bug 1658878)
Backed out changeset 16a33c7b4ff3 (bug 1658878)
2020-08-14 22:41:05 +03:00
Andrea Marchesini a4f8193237 Bug 1658878 - Isolate BlobURLs per agent-cluster - cleanup remove method, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87059
2020-08-14 17:39:26 +00:00
Andrea Marchesini 8d8dfa8e36 Bug 1658878 - Isolate BlobURLs per agent-cluster - pref, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86968
2020-08-14 17:39:14 +00:00
Andrea Marchesini 3ba2ef34df Bug 1658878 - Isolate BlobURLs per agent-cluster - tests, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86915
2020-08-14 16:59:42 +00:00
Andrea Marchesini 91ce718928 Bug 1658878 - Isolate BlobURLs per agent-cluster, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86914
2020-08-14 16:59:44 +00:00
Mihai Alexandru Michis 33c1daa575 Backed out 4 changesets (bug 1658878) for causing failures in browser_blobURLIsolation.js
CLOSED TREE

Backed out changeset f69f80e5659f (bug 1658878)
Backed out changeset 20401a2adaa6 (bug 1658878)
Backed out changeset a8620aecc29f (bug 1658878)
Backed out changeset 3609760c1e5d (bug 1658878)
2020-08-14 19:55:25 +03:00
Andrea Marchesini 0920dd26fe Bug 1658878 - Isolate BlobURLs per agent-cluster - cleanup remove method, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87059
2020-08-14 15:57:45 +00:00
Andrea Marchesini 2175d60f4a Bug 1658878 - Isolate BlobURLs per agent-cluster - pref, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86968
2020-08-14 15:57:02 +00:00
Andrea Marchesini b40d7a83c4 Bug 1658878 - Isolate BlobURLs per agent-cluster - tests, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86915
2020-08-14 15:57:02 +00:00
Andrea Marchesini 5c2811edd6 Bug 1658878 - Isolate BlobURLs per agent-cluster, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86914
2020-08-14 10:41:22 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
ssengupta 49786eae4d Bug 1619953 - P12 - Blob data is retrieved locally for non-http/https URLs r=baku
Differential Revision: https://phabricator.services.mozilla.com/D85868
2020-08-05 17:05:36 +00:00
ssengupta fd9c765041 Bug 1619953 - P6 - BlobURLChannel creates BlobURLInputStream only when content stream is opened r=baku
Additionally, BlobURLChannel holds no strong reference to BlobURLInputStream. This is to avoid circular dependency.

Differential Revision: https://phabricator.services.mozilla.com/D81452
2020-08-05 17:06:04 +00:00
ssengupta 8d095d15bf Bug 1619953 - P5 - BlobURLChannel allows loading blob data that is very recently revoked r=baku
Previously similar logic existed in BlobURLProtocolHandler, which has now been removed, since such checks are now for parent process only and should be abstracted from BlobURLProtocolHandler.

Depends on D75293

Differential Revision: https://phabricator.services.mozilla.com/D81126
2020-08-05 17:06:01 +00:00
ssengupta 6afc3aa5cd Bug 1619953 - P4 - BlobURLChannel now creates BlobURLInputStream to acquire blob data r=baku
BlobURLProtocolHandler no longer passes blobImpl pointer to BlobURLChannel. Instead, acquisition and handling of blob data is offloaded to BlobURLInputStream.

Differential Revision: https://phabricator.services.mozilla.com/D75293
2020-08-05 17:05:59 +00:00
ssengupta f600911e45 Bug 1619953 - P3 - Asynchronous BlobURLInputStream added r=baku
Reading from this stream type should be the preferred way to consume data from blob url. When created in the parent process, it requests blob data locally from BlobURLProtocolHandler. When created in a content process, it makes BlobURLDataRequest IPC call to the parent process. Should be wrapped in a nsBufferedInputStream, because ReadSegments() is currently not implemented for this stream type.

Differential Revision: https://phabricator.services.mozilla.com/D75292
2020-08-05 17:05:56 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
ssengupta a9e4714041 Bug 1633880 - P2 - RemoteLazyInputStreamStorage::Get() now returns mozilla::Result<RefPtr<RemoteLazyInputStreamStorage>, nsresult> r=baku
Differential Revision: https://phabricator.services.mozilla.com/D80541
2020-07-03 12:59:19 +00:00
ssengupta 71d5e0b3aa Bug 1633880 - P1 - gStorage in RemoteLazyInputStreamStorage is protected by gMutex r=baku
Differential Revision: https://phabricator.services.mozilla.com/D80540
2020-07-03 12:59:11 +00:00
Csoregi Natalia 4dcffa68cd Backed out 9 changesets (bug 1619953) for causing leaks. CLOSED TREE
Backed out changeset 9f610c8c44de (bug 1619953)
Backed out changeset 4e66983a4f00 (bug 1619953)
Backed out changeset 38aac5691967 (bug 1619953)
Backed out changeset 062c0c9b132f (bug 1619953)
Backed out changeset 830eb658d70e (bug 1619953)
Backed out changeset fccda4625d51 (bug 1619953)
Backed out changeset 4668c99560de (bug 1619953)
Backed out changeset 77c24528c8c2 (bug 1619953)
Backed out changeset b79dc688bfc9 (bug 1619953)
2020-07-02 17:58:57 +03:00
ssengupta 8e3d58167d Bug 1619953 - P6 - BlobURLChannel creates BlobURLInputStream only when content stream is opened r=baku
Additionally, BlobURLChannel holds no strong reference to BlobURLInputStream. This is to avoid circular dependency.

Differential Revision: https://phabricator.services.mozilla.com/D81452
2020-07-02 13:38:29 +00:00
ssengupta 30cf4ca723 Bug 1619953 - P5 - BlobURLChannel allows loading blob data that is very recently revoked r=baku
Previously similar logic existed in BlobURLProtocolHandler, which has now been removed, since such checks are now for parent process only and should be abstracted from BlobURLProtocolHandler.

Depends on D75293

Differential Revision: https://phabricator.services.mozilla.com/D81126
2020-07-02 13:38:26 +00:00
ssengupta 32ea535c07 Bug 1619953 - P4 - BlobURLChannel now creates BlobURLInputStream to acquire blob data r=baku
BlobURLProtocolHandler no longer passes blobImpl pointer to BlobURLChannel. Instead, acquisition and handling of blob data is offloaded to BlobURLInputStream.

Differential Revision: https://phabricator.services.mozilla.com/D75293
2020-07-02 13:38:06 +00:00
ssengupta 1bcf359b60 Bug 1619953 - P3 - Asynchronous BlobURLInputStream added r=baku
Reading from this stream type should be the preferred way to consume data from blob url. When created in the parent process, it requests blob data locally from BlobURLProtocolHandler. When created in a content process, it makes BlobURLDataRequest IPC call to the parent process. Should be wrapped in a nsBufferedInputStream, because ReadSegments() is currently not implemented for this stream type.

Differential Revision: https://phabricator.services.mozilla.com/D75292
2020-07-02 13:37:58 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke e3c223da3e Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80861
2020-07-01 08:34:12 +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
Andrea Marchesini 4c6f89824d Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 8 - mozilla namespace, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80931
2020-06-29 13:40:27 +00:00
Andrea Marchesini 34cbc7e2ed Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 7 - RemoteLazyInputStreamUtils, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80930
2020-06-29 11:02:59 +00:00
Andrea Marchesini 2c405fb804 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 6 - remoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80929
2020-06-29 11:02:55 +00:00
Andrea Marchesini c6e87ab4b6 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 5 - thread, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80928
2020-06-29 13:39:01 +00:00
Andrea Marchesini 5fc1253731 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 4 - IPDL actors, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80927
2020-06-29 11:03:02 +00:00
Andrea Marchesini 8f12e90e00 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 3 - PRemoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80926
2020-06-29 11:03:04 +00:00
Andrea Marchesini 07f5abb16d Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 2 - RemoteLazyInputStreamStorage, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80925
2020-06-29 11:02:50 +00:00
Andrea Marchesini 5def6bbc8c Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 1 - mozIRemoteLazyInputStream interface, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80924
2020-06-29 11:02:53 +00:00
Razvan Maries f7cb24cc7e Backed out 8 changesets (bug 1648141) for build bustages on RemoteLazyInputStreamThread.cpp. CLOSED TREE
Backed out changeset e9b4ca0ee700 (bug 1648141)
Backed out changeset b9bb847cee47 (bug 1648141)
Backed out changeset 11dfce46ec14 (bug 1648141)
Backed out changeset d824d2f67f27 (bug 1648141)
Backed out changeset e5b8292e7095 (bug 1648141)
Backed out changeset c1a3d5fa0c61 (bug 1648141)
Backed out changeset 24fdb83db3cd (bug 1648141)
Backed out changeset 749d894dde52 (bug 1648141)
2020-06-29 13:59:16 +03:00
Andrea Marchesini c71431ab1b Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 8 - mozilla namespace, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80931
2020-06-29 10:30:00 +00:00
Andrea Marchesini 16339b8334 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 7 - RemoteLazyInputStreamUtils, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80930
2020-06-29 10:29:05 +00:00
Andrea Marchesini d50c65af76 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 6 - remoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80929
2020-06-29 10:28:21 +00:00
Andrea Marchesini 2641b9afe4 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 5 - thread, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80928
2020-06-29 10:27:38 +00:00
Andrea Marchesini 87e1daec9f Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 4 - IPDL actors, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80927
2020-06-29 10:27:20 +00:00
Andrea Marchesini d7cec00cfb Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 3 - PRemoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80926
2020-06-29 10:26:33 +00:00
Andrea Marchesini 54b73ea513 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 2 - RemoteLazyInputStreamStorage, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80925
2020-06-29 10:25:24 +00:00
Andrea Marchesini 82d0167e5e Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 1 - mozIRemoteLazyInputStream interface, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80924
2020-06-29 10:25:08 +00:00
Andrea Marchesini 5270b37037 Bug 1645786 - IPCBlobInputStream for socket process, r=smaug,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D80680
2020-06-25 12:21:14 +00:00
Jean-Yves Avenard 87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00
Nicholas Nethercote a8f5f49b8a Bug 1645982 - Rename some service getters in `Services.py` to better match the types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79791
2020-06-16 23:32:21 +00:00
Andrea Marchesini b058e12e25 Bug 1502403 - FileReader should dispatch loadstart asynchronously, r=smaug,ssengupta
Differential Revision: https://phabricator.services.mozilla.com/D78852
2020-06-09 14:41:14 +00:00
Butkovits Atila 29d7b0825b Backed out changeset d10fb80f7aa0 (bug 1502403) for build bustages at rules.mk. CLOSED TREE 2020-06-09 17:06:04 +03:00
Andrea Marchesini ce0bdd5ce6 Bug 1502403 - FileReader should dispatch loadstart asynchronously, r=smaug,ssengupta
Differential Revision: https://phabricator.services.mozilla.com/D78852
2020-06-09 12:52:31 +00:00
ssengupta 981a0e4d28 Bug 1637742 - P2 - IPCBlobInputStream does not return error and executes callback on AsyncWait/AsyncLengthWait if stream is closed r=baku
Depends on D77407

Differential Revision: https://phabricator.services.mozilla.com/D77408
2020-06-02 13:21:16 +00:00
Perry Jiang 2c1b60619c Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku
Initially, IPCInternal{Request,Response} had contained IPCStreams which would
result in unecessary copying when sending the objects over IPC. The patch
makes these streams either:

1) ParentToParentStream (just a UUID)
2) ParentToChildStream (a PIPCBlobInputStream actor, acting as a handle)
3) ChildToParentStream (a real IPCStream)

These three types are union-ed together by the BodyStreamVariant IPDL structure.
This structure replaces the IPCStream members in IPCInternal{Request,Response}
so that, depending on the particular IPDL protocol, we can avoid cloning streams
and just pass handles/IDs instead.

As a side effect, this makes file-backed Response objects cloneable. Initially,
these Responses would be backed by an nsFileInputStream, which is not cloneable
outside the parent process. They are now backed by IPCBlobInputStreams, which
are cloneable.

One thing that's not really satisfactory (IMO), is the manual management of
IPCBlobInputStreamStorage so that no streams are leaked, e.g. if we store a
stream in the IPCBlobInputStreamStorage but fail to send an IPC message and
therefore fail to remove the stream from storage on the other side of the IPC
boundary (only parent-to-parent in this case).

Differential Revision: https://phabricator.services.mozilla.com/D73173
2020-05-29 09:09:54 +00:00
Brindusan Cristian 323d794df6 Backed out 1 changesets (bug 1622451) for assertion failures on UniquePtr.h. CLOSED TREE
Backed out changeset fb8e753340e4 (bug 1622451)
2020-05-28 23:31:26 +03:00
Perry Jiang 8d7bde9382 Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku
Initially, IPCInternal{Request,Response} had contained IPCStreams which would
result in unecessary copying when sending the objects over IPC. The patch
makes these streams either:

1) ParentToParentStream (just a UUID)
2) ParentToChildStream (a PIPCBlobInputStream actor, acting as a handle)
3) ChildToParentStream (a real IPCStream)

These three types are union-ed together by the BodyStreamVariant IPDL structure.
This structure replaces the IPCStream members in IPCInternal{Request,Response}
so that, depending on the particular IPDL protocol, we can avoid cloning streams
and just pass handles/IDs instead.

As a side effect, this makes file-backed Response objects cloneable. Initially,
these Responses would be backed by an nsFileInputStream, which is not cloneable
outside the parent process. They are now backed by IPCBlobInputStreams, which
are cloneable.

One thing that's not really satisfactory (IMO), is the manual management of
IPCBlobInputStreamStorage so that no streams are leaked, e.g. if we store a
stream in the IPCBlobInputStreamStorage but fail to send an IPC message and
therefore fail to remove the stream from storage on the other side of the IPC
boundary (only parent-to-parent in this case).

Differential Revision: https://phabricator.services.mozilla.com/D73173
2020-05-28 15:15:43 +00:00
owlishDeveloper 887def6ff1 Bug 1432949 - Allow system principal initialize a channel for revoked blob URLs r=geckoview-reviewers,snorp,baku,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75659
2020-05-20 14:39:28 +00:00
Csoregi Natalia 83cd8858fc Backed out changeset e1be97ce43d1 (bug 1622451) for failures on browser_download_canceled.js. CLOSED TREE 2020-05-01 03:58:25 +03:00
Perry Jiang 1ad4e039d4 Bug 1622451 - minimize stream copying across IPC boundaries r=asuth,baku
Initially, IPCInternal{Request,Response} had contained IPCStreams which would
result in unecessary copying when sending the objects over IPC. The patch
makes these streams either:

1) ParentToParentStream (just a UUID)
2) ParentToChildStream (a PIPCBlobInputStream actor, acting as a handle)
3) ChildToParentStream (a real IPCStream)

These three types are union-ed together by the BodyStreamVariant IPDL structure.
This structure replaces the IPCStream members in IPCInternal{Request,Response}
so that, depending on the particular IPDL protocol, we can avoid cloning streams
and just pass handles/IDs instead.

As a side effect, this makes file-backed Response objects cloneable. Initially,
these Responses would be backed by an nsFileInputStream, which is not cloneable
outside the parent process. They are now backed by IPCBlobInputStreams, which
are cloneable.

One thing that's not really satisfactory (IMO), is the manual management of
IPCBlobInputStreamStorage so that no streams are leaked, e.g. if we store a
stream in the IPCBlobInputStreamStorage but fail to send an IPC message and
therefore fail to remove the stream from storage on the other side of the IPC
boundary (only parent-to-parent in this case).

Differential Revision: https://phabricator.services.mozilla.com/D73173
2020-04-30 23:52:54 +00:00
Andrea Marchesini 25c14a3dbc Bug 1633731 - Avoid cloning IPCBlobInputStream objects when not needed, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D72853
2020-04-28 13:32:22 +00:00
Matt Woodrow 20f213591b Bug 1624318 - Serialize replacement config input stream as a blob. r=baku,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D71872
2020-04-27 04:49:00 +00:00
Kris Maglione 4c89b71494 Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8
These tests used <iframe mozbrowser> for convenience, mostly forcing
themselves to only run in non-e10s mode in the process, but none of them
really have any need to.

Differential Revision: https://phabricator.services.mozilla.com/D70745
2020-04-20 22:31:29 +00:00
Ciure Andrei a5ac2a8bbc Backed out 10 changesets (bug 1614462) for causing test_ipc_messagemanager_blob.js failures CLOSED TREE
Backed out changeset bf4f8253c708 (bug 1614462)
Backed out changeset c61b797d63e9 (bug 1614462)
Backed out changeset 284002de7137 (bug 1614462)
Backed out changeset 7f604ee5731c (bug 1614462)
Backed out changeset a73ef8167cd4 (bug 1614462)
Backed out changeset ecc3477ed34e (bug 1614462)
Backed out changeset 2106f3ccc4b5 (bug 1614462)
Backed out changeset e68c38a7741d (bug 1614462)
Backed out changeset 93b3bacdbb34 (bug 1614462)
Backed out changeset 0cf4898ae08d (bug 1614462)
2020-04-21 01:11:37 +03:00
Kris Maglione d1639bbfcd Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8
These tests used <iframe mozbrowser> for convenience, mostly forcing
themselves to only run in non-e10s mode in the process, but none of them
really have any need to.

Differential Revision: https://phabricator.services.mozilla.com/D70745
2020-04-20 20:11:43 +00:00
Ciure Andrei c15dcac93b Backed out 10 changesets (bug 1614462) for causing xpcshell failures CLOSED TREE
Backed out changeset 34d4a86530b4 (bug 1614462)
Backed out changeset dbc2e2556d08 (bug 1614462)
Backed out changeset 512bbab4730c (bug 1614462)
Backed out changeset cd6b8d630f4c (bug 1614462)
Backed out changeset e4ad5037658f (bug 1614462)
Backed out changeset 0ffed1dc4296 (bug 1614462)
Backed out changeset 90ed81cbfe34 (bug 1614462)
Backed out changeset 6d2137eb1d52 (bug 1614462)
Backed out changeset b4819c99e16e (bug 1614462)
Backed out changeset b7deaed376ed (bug 1614462)
2020-04-17 02:26:14 +03:00
Kris Maglione c45d02801c Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8
These tests used <iframe mozbrowser> for convenience, mostly forcing
themselves to only run in non-e10s mode in the process, but none of them
really have any need to.

Differential Revision: https://phabricator.services.mozilla.com/D70745
2020-04-16 16:57:14 +00:00
Tom Tung 3d9adc5e80 Bug 1586761 - P4 - Use new methods in dom/file and dom/events; r=baku
For the usecases in dom/file, I'm not so sure how to get the global at
callsites, so I let aIsSystemPrincipal and aCrossOriginIsolated to be false for
now.

Differential Revision: https://phabricator.services.mozilla.com/D63905

--HG--
extra : moz-landing-system : lando
2020-03-25 14:14:37 +00:00
Andreas Farre 9e36af2ab6 Bug 1620594 - Part 3: Use default target for timers using SystemGroup. r=nika
Depends on D67632

Differential Revision: https://phabricator.services.mozilla.com/D67633

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:46 +00:00
Andreas Farre 36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

Differential Revision: https://phabricator.services.mozilla.com/D67632

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00