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

150 Коммитов

Автор SHA1 Сообщение Дата
Peter Van der Beken b8156bbc41 Bug 1777145 - Don't expose Wrap for WebIDL iterable iterator objects outside of binding code. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D156348
2022-09-22 18:28:18 +00:00
Olli Pettay 93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Gerald Squelart 4326b92ea7 Bug 1784812 - Use common JSONWriteFuncs when writing to a string - r=canaltinova,media-playback-reviewers,alwu
Most users of JSONWriter want to fill a string, so instead of having all these
similar implementations, we now have central reusable implementations:
- JSONStringWriteFunc contains a string and writes to it.
- JSONStringRefWriteFunc references a string and writes to it. This is most
  useful when the string already exists somewhere, or needs to be returned from
  a function (so we avoid another conversion when returning).

Differential Revision: https://phabricator.services.mozilla.com/D154618
2022-08-17 07:07:54 +00:00
Gerald Squelart eb90b3b175 Bug 1784812 - JSONWriter may optionally not own its writer - r=canaltinova
mWriter is now a reference, and the ownership is optional through a separate
member variable that could stay null.
User can now choose to keep the JSONWriteFunc on their stack, which saves a
heap allocation, and makes it easier to access the concrete JSONWriteFunc
implementation directly (instead of through WriteFunc()).

Differential Revision: https://phabricator.services.mozilla.com/D154617
2022-08-17 07:07:53 +00:00
Iulian Moraru 859487ba6b Backed out 4 changesets (bug 1784812) for causing build bustages on DDMediaLogs. CLOSED TREE
Backed out changeset c9998c927079 (bug 1784812)
Backed out changeset d2568bc2f8a6 (bug 1784812)
Backed out changeset 9f01bf89c583 (bug 1784812)
Backed out changeset d8506496d8f2 (bug 1784812)
2022-08-17 05:48:36 +03:00
Adam Vandolder 81c2706200 Bug 1774155 - Avoid copying data URI specs in deprecation warning. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D154692
2022-08-17 02:18:22 +00:00
Gerald Squelart 253bb5dc48 Bug 1784812 - Use common JSONWriteFuncs when writing to a string - r=canaltinova,media-playback-reviewers,alwu
Most users of JSONWriter want to fill a string, so instead of having all these
similar implementations, we now have central reusable implementations:
- JSONStringWriteFunc contains a string and writes to it.
- JSONStringRefWriteFunc references a string and writes to it. This is most
  useful when the string already exists somewhere, or needs to be returned from
  a function (so we avoid another conversion when returning).

Depends on D154617

Differential Revision: https://phabricator.services.mozilla.com/D154618
2022-08-16 22:57:49 +00:00
Gerald Squelart 722fbce3cc Bug 1784812 - JSONWriter may optionally not own its writer - r=canaltinova
mWriter is now a reference, and the ownership is optional through a separate
member variable that could stay null.
User can now choose to keep the JSONWriteFunc on their stack, which saves a
heap allocation, and makes it easier to access the concrete JSONWriteFunc
implementation directly (instead of through WriteFunc()).

Depends on D154616

Differential Revision: https://phabricator.services.mozilla.com/D154617
2022-08-16 22:57:49 +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
Mark Banner 7229e2e33b Bug 1782008 - Remove unnecessary no-unused-vars rules definitions from .eslintrc.js files. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D153065
2022-08-03 11:16:18 +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
Tom Ritter 5d4fe766fe Bug 1737829: Change the Navigator::UserAgent function for RFP r=asuth
We change it from taking bool aIsCallerChrome to
Maybe<bool> aShouldResistFingerprinting.  If there is
a value in there, it is used for determining RFP status.
If not, we call ShouldRFP with the provided Document.

This is needed because on a Worker, we wind up in UserAgent
with no Document, we need to pass the RFP decision in
from WorkerPrivate.

Differential Revision: https://phabricator.services.mozilla.com/D144581
2022-07-15 20:39:23 +00:00
Muhammad 0bf10d70ab Bug 1737829: Cut over Navigator components to fine-grained RFP Checks r=tjr,asuth
Whereas previously we would pass in the principal of a document,
now we will pass in the document directly. This will work for most use
cases, but not all (like Workers.)

Additionally, for the User Agent, if we do not Resist Fingerprinting
(because there is an exemption), we will fall through to getting the
User-Agent header which uses the coarse RFP check, so we fix that in
a later patch.

Differential Revision: https://phabricator.services.mozilla.com/D138778
2022-07-15 20:39:21 +00:00
Mark Banner 3924c8914b Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-18 08:13:19 +00:00
Sebastian Hengst c552340e0c Backed out 5 changesets (bug 1769569) for causing devtools' browser/browser_page_redirection.js to fail. CLOSED TREE
Backed out changeset 66a42eb3a366 (bug 1769569)
Backed out changeset d3cc9629cd9a (bug 1769569)
Backed out changeset edcd3dade079 (bug 1769569)
Backed out changeset 29d8dd058b7a (bug 1769569)
Backed out changeset 1aed34fdf2d3 (bug 1769569)
2022-05-17 19:49:17 +02:00
Mark Banner 4acbb4ff59 Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-17 16:50:33 +00:00
Kagami Sascha Rosylight 544bfe11bc Bug 1768189 - Part 26: Apply modernize-concat-nested-namespaces to dom/reporting/ReportingHeader.cpp ... r=andi
Depends on D145759

Differential Revision: https://phabricator.services.mozilla.com/D145760
2022-05-09 20:41:13 +00:00
Kagami Sascha Rosylight b432cc0606 Bug 1768189 - Part 25: Apply modernize-concat-nested-namespaces to dom/push/PushNotifier.h ... r=andi
Depends on D145758

Differential Revision: https://phabricator.services.mozilla.com/D145759
2022-05-09 20:41:12 +00:00
Nika Layzell dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Matthew Gaudet bc10b96605 Bug 1748888 - Add ErrorResult parameter to PromiseNativeHandler callbacks r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136423
2022-01-20 19:11:39 +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
Florian Quèze 998adb18ea Bug 1728760 - require all nsITimerCallback native implementations to also implement nsINamed, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D124349
2021-09-07 08:01:18 +00:00
Steve Fink 464ba9c559 Bug 1727374 - Root Init dictionaries to fix rooting hazards. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D123633
2021-09-02 19:06:58 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +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
Gerald Squelart 96f3fabfcb Bug 1693037 - Fix non-MOZ_GECKO_PROFILER builds - r=florian
No code changes.

Build issues were found by renaming `MOZ_GECKO_PROFILER` to something else in toolkit/moz.configure, in both unified and non-unified builds, on all supported platforms.

Also updated some profiler-related comments.

Differential Revision: https://phabricator.services.mozilla.com/D105375
2021-02-17 22:36:28 +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
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 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
Andi-Bogdan Postelnicu eddf5c3167 Bug 1626555 - Add `dom/reporting` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D96398
2020-11-09 12:14:27 +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
Gerald Squelart 782cf5d3ad Bug 1657033 - Use Span<const char> in JSONWriter - r=froydnj
In most situations, JSONWriter users already know string lengths (either directly, or through `nsCString` and friends), so we should keep this information through JSONWriter and not recompute it again.
This also allows using JSONWriter with sub-strings (e.g., from a bigger buffer), without having to create null-terminated strings.

Public JSONWriter functions have overloads that accept literal strings.

Differential Revision: https://phabricator.services.mozilla.com/D86192
2020-09-14 02:33:20 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Nathan Froyd 0050523469 Bug 1656359 - eliminate needless string flattening when calling JS_ParseJSON; r=peterv
JS_ParseJSON doesn't require a null-terminated buffer, so we shouldn't have
to provide one.

Differential Revision: https://phabricator.services.mozilla.com/D85475
2020-08-04 14:17:37 +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
Joel Maher 2f2dc70492 Bug 1654553 - fix browser chrome tests to support Object.is instead of ==. r=gbrown,preferences-reviewers,Gijs,rpl
fix browser chrome tests to support Object.is instead of ==

Differential Revision: https://phabricator.services.mozilla.com/D84539
2020-07-27 17:02:35 +00:00
Simon Giesecke e443211b53 Bug 1653229 - Remove unnecessary includes for BindingUtils.h. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D83771
2020-07-22 15:12:10 +00:00