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

10213 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart 001b0d4ec0 Bug 1612799 - JITFrameInfo carries its own FailureLatchSource - r=canaltinova
Because JITFrameInfo objects are creating *during* profiling, they need to have
their own fallible FailureLatchSource, so that any error can be safely handled
even before we know which FailureLatch will be used in the final JSON
generation work.

Differential Revision: https://phabricator.services.mozilla.com/D155655
2022-09-05 01:19:30 +00:00
Gerald Squelart 892f66577e Bug 1612799 - Make ProcessStreamingContext a FailureLatch - r=canaltinova
This will help with forwarding the chosen FailureLatch to the code and
structures gathering per-thread samples and markers.

Differential Revision: https://phabricator.services.mozilla.com/D155654
2022-09-05 01:19:30 +00:00
Gerald Squelart 7dc3f8d14e Bug 1612799 - Make UniqueJSONStrings a FailureLatch - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D155652
2022-09-05 01:19:29 +00:00
Gerald Squelart 1339f652fd Bug 1612799 - Make Spliceable{,Chunked}JSONWriter a FailureLatch - r=canaltinova
For now, all users specify an infallible latch.

Differential Revision: https://phabricator.services.mozilla.com/D155651
2022-09-05 01:19:28 +00:00
Gerald Squelart cc671ebfb1 Bug 1612799 - Make ChunkedJSONWriteFunc a FailureLatch, with optionally-fallible operations - r=canaltinova
Note that at this point, it's using the FailureLatchInfallibleSource singleton,
so operations are still effectively infallible, i.e. they will terminate the
program.
But users already handle future fallible outcomes.

Differential Revision: https://phabricator.services.mozilla.com/D155649
2022-09-05 01:19:28 +00:00
Mark Banner 783a2f2187 Bug 1788037 - Turn on ESLint rule for prefer-boolean-length-check for dom. r=asuth,karlt
Differential Revision: https://phabricator.services.mozilla.com/D155965
2022-09-02 11:05:17 +00:00
Michael Froman 576ec4496f Bug 1766646 (MOZ) - mirror changes from upstream's rtc_base/trace_event.h 2022-08-30 10:30:42 -04:00
Eemeli Aro 24830b1cc6 Bug 1787411 - Migrate layout debugger localization to Fluent. r=fluent-reviewers,flod,emilio
The localization file is moved to `content/` to make it more clear that it's not intended to be localised.

For the same reason, no Fluent migration script is included as there are no localised strings to migrate.

Differential Revision: https://phabricator.services.mozilla.com/D155702
2022-08-29 09:59:35 +00:00
Mathew Hodson d714558ef6 Bug 1762444 - Make no-addtask-setup eslint rule case-insensitive. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D150329
2022-08-29 08:54:55 +00:00
Gabriel Bustamante d74544871f Bug 1752111 - Make l10n bumper run on autoland instead of mozilla-central r=aki
Differential Revision: https://phabricator.services.mozilla.com/D154305
2022-08-26 16:30:09 +00:00
Mark Banner 65b92de13b Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for tools. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D155176
2022-08-26 13:39:38 +00:00
Gabriele Svelto e111b7125f Bug 1787087 - Remove breakpad's dump_syms from the macOS system symbols scrapers and use the Rust one instead r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D155561
2022-08-25 09:45:39 +00:00
Kagami Sascha Rosylight 102bd338be Bug 1695435 - Part 2: Add more words to the chrome script heuristic in use-isInstance r=preferences-reviewers,Gijs,webdriver-reviewers,whimboo,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D110932
2022-08-24 22:47:42 +00:00
Sandor Molnar 413fd984e6 Backed out changeset a9befcc1f72b (bug 1752111) for causint l10n bumper bustages on autoland. 2022-08-25 01:40:25 +03:00
Gabriel Bustamante 7082d438e6 Bug 1752111 - Make l10n bumper run on autoland instead of mozilla-central r=aki
Differential Revision: https://phabricator.services.mozilla.com/D154305
2022-08-24 18:01:40 +00:00
andrej 89b961d2c2 Bug 1785735 - try compare not working with --rebulid flag. r=perftest-reviewers,ahal,kshampur
What I am doing:
- Adding code to allow the --rebuild flag to be added as an option
- Fixing bug where if no compare commit is provided parent is used as default

Why:
- User request

Differential Revision: https://phabricator.services.mozilla.com/D155103
2022-08-23 18:59:09 +00:00
Barret Rennie 4809f1d287 Bug 1783416 - Fix code-coverage xpcshell tests r=marco
Differential Revision: https://phabricator.services.mozilla.com/D154574
2022-08-23 14:57:54 +00:00
Sylvestre Ledru 3de663bf52 Bug 1782696 - Update dependency pylint to v2.14.5 r=linter-reviewers,andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D153955
2022-08-23 09:55:19 +00:00
John Bieling 24210e2c3a Bug 1764698 - Move LanguageDetector.jsm and related files to toolkit. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D151606
2022-08-23 05:59:55 +00:00
Gerald Squelart 90b45a2617 Bug 1785745 - Make UniqueStack::mUniqueStrings and mCodeAddressService private - r=canaltinova
This makes it easier to understand how these are actually used, and constrain
these uses as intended.

Differential Revision: https://phabricator.services.mozilla.com/D154960
2022-08-22 21:31:48 +00:00
Gerald Squelart f4a903ae13 Bug 1785745 - Convert struct JITFrameInfo into a proper class - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D154958
2022-08-22 21:31:47 +00:00
Kagami Sascha Rosylight a41415cb68 Bug 1695435 - Part 1: Use isInstance in XUL files r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D154841
2022-08-22 18:34:44 +00:00
Sylvestre Ledru 1168786be4 Bug 1785451 - Update codespell to 2.2.1 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D155233
2022-08-22 17:09:32 +00:00
Jason Prickett bffaa61b3d Bug 1781378 - Adding final MR onboarding strings r=pdahiya,fluent-reviewers,flod,Mardak
Differential Revision: https://phabricator.services.mozilla.com/D154681
2022-08-19 20:42:45 +00:00
Gerald Squelart bb96954e6d Bug 1785741 - Remove unused profiler_get_profile_json_into_lazily_allocated_buffer - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D154954
2022-08-18 22:26:09 +00:00
renovate[bot] fa48206157 no bug - Update dependency mdurl to v0.1.2 r=linter-reviewers,andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D154888
2022-08-18 20:13:16 +00:00
Sylvestre Ledru f8959e479c Bug 1785451 - Update codespell to 2.2.0 r=linter-reviewers,andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D154945
2022-08-18 20:10:41 +00:00
Sylvestre Ledru 128c74caac Bug 1785451 - Ride along: Fix some typos r=linter-reviewers,fluent-reviewers,geckoview-reviewers,extension-reviewers,keeler,rpl,calu,ahal,flod DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D154946
2022-08-18 07:29:08 +00:00
renovate[bot] 078e93eeac no bug - Update dependency colorama to v0.4.5 r=linter-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D154874
2022-08-17 13:46:04 +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
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
Renovate Bot 84efbfcef4 no bug - Update dependency rstcheck to v3.5.0 r=linter-reviewers,andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D154070
2022-08-16 13:02:48 +00:00
Paul Zuehlcke 017ccb0be2 Bug 1783019 - Implement cookie banner handling components. r=timhuang,necko-reviewers,valentin
This patch adds the following components:
 - nsICookieBannerService: Main service singleton managing the rules and initiating other components.
   It's exposed via Services.cookieBanners and can be configured via the cookiebanners.* prefs.
   To enable it set "cookiebanners.service.mode" to 1 or 2 and restart the browser.
 - nsCookieInjector: Looks up rules and injects cookies for matching top level loads.
 - nsICookieBannerListService: Imports and updates the cookie banner rules.
 - nsICookieBannerRule: Rules for a given domain.
 - nsICookieRule: Part of nsICookieBannerRule. Holds cookie specific rules.

Depends on D153641

Differential Revision: https://phabricator.services.mozilla.com/D153642
2022-08-16 12:07:13 +00:00
Kershaw Chang 35d82ae8cc Bug 1783822 - Add node 'ws' library for xpcshell test, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D154097
2022-08-16 07:39:34 +00:00
Sylvestre Ledru 4def815e85 Bug 1784857 - be consistent in the mccabe version r=linter-reviewers,andi
Depends on D154642

Differential Revision: https://phabricator.services.mozilla.com/D154643
2022-08-15 20:09:06 +00:00
Sylvestre Ledru a516a4f498 Bug 1784857 - Update to flake8 5.0.4 r=linter-reviewers,ahal
One of the argument has been renamed here:
8d3afe40e1

Depends on D154641

Differential Revision: https://phabricator.services.mozilla.com/D154642
2022-08-15 20:09:06 +00:00
Mark Banner cd24cf259e Bug 1784699 - Turn off the ESLint browser environment for xpcshell-tests for better represetation of the globals actually available. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154606
2022-08-15 16:50:33 +00:00
Mark Banner 732ec28d02 Bug 1784699 - Add WebAssembly to the ESLint list of privileged globals. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154605
2022-08-15 16:50:32 +00:00
Mark Banner 445161e7d6 Bug 1784699 - Move the ESLint Intl definition across to the privileged environment as it fits better there. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154604
2022-08-15 16:50:32 +00:00
Mark Banner 0bbc4182e5 Bug 1784699 - Add some more globals to ESLint xpcshell environment. r=arai,application-update-reviewers,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D154603
2022-08-15 16:50:31 +00:00
Mark Banner 98ec3f4fa1 Bug 1784699 - Add Readable/WriteableStream related globals to the list of privileged globals for ESLint. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154602
2022-08-15 16:50:31 +00:00
Cosmin Sabou 8dd2842ffe Bug 1783416 - Skip test_basic.js on coverage builds due to permafailure. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D154504
2022-08-12 12:23:03 +00:00
André Bargull 60863b7187 Bug 1783404: Support --fix option when eslint-plugin-spidermonkey-js is used. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D153843
2022-08-12 06:10:55 +00:00
Andrew Halberstadt 523889d2a7 Bug 1780278 - Update vendored taskgraph to 2.0.0, r=releng-reviewers,hneiva
Differential Revision: https://phabricator.services.mozilla.com/D153644
2022-08-09 19:22:11 +00:00
Kagami Sascha Rosylight 16ea24f6cc Bug 1769290 - Part 26: Emit errors from JSHandleRootedTypedefChecker r=andi,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D151842
2022-08-09 14:13:30 +00:00
Iulian Moraru 480242bffe Backed out changeset aac498e445a2 (bug 1782696) for causing py3 mozlint failures. CLOSED TREE 2022-08-09 14:40:44 +03:00
renovate[bot] 8c730122d1 Bug 1782696 - Update dependency pylint to v2.14.5 r=linter-reviewers,andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D153955
2022-08-09 09:18:00 +00:00
Gerald Squelart 6cd5fee5d2 Bug 1571089 - Remove the "leaf" profiler feature - r=canaltinova
We currently support stack walking everywhere, and when it fails, we fall back
to leaf stacks. The leaf option is a bit confusing in how it works, and doesn't
provide much value.

Differential Revision: https://phabricator.services.mozilla.com/D153695
2022-08-08 12:29:43 +00:00
Butkovits Atila 1a455850f9 Backed out changeset 523ef50a4e16 (bug 1571089) for causing xpcshell failures at test_ext_geckoProfiler_schema.js. CLOSED TREE 2022-08-08 13:21:54 +03:00
Gerald Squelart 24f16538a9 Bug 1571089 - Remove the "leaf" profiler feature - r=canaltinova
We currently support stack walking everywhere, and when it fails, we fall back
to leaf stacks. The leaf option is a bit confusing in how it works, and doesn't
provide much value.

Differential Revision: https://phabricator.services.mozilla.com/D153695
2022-08-08 08:43:43 +00:00
Christian Holler 401cd59012 Bug 1782502 - Fix incorrect log message when fuzzing with Nyx. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D153346
2022-08-06 08:29:27 +00:00
Christian Holler 385aa3a622 Bug 1782507 - Pin IPC fuzzing to new actor / last port after constructor. r=truber
Depends on D153344

Differential Revision: https://phabricator.services.mozilla.com/D153345
2022-08-05 17:23:00 +00:00
André Bargull 96daf134a0 Bug 1782491 - Part 1: Add self-hosted code environment plugin. r=tcampbell
Adds a simple ESLint plugin for custom environments.

The plugin has a single exported value named `globals`, which is an object with
keys for all globally available self-hosted identifiers. All self-hosted values
are read-only, so we set all properties of `globals` to `"readonly"`.

BytecodeEmitter special identifiers are added to the `.eslintrc.js` file,
because that keeps them closer to the SpiderMonkey source tree when compared
to "tools/lint/eslint/eslint-plugin-spidermonkey-js".

Also see:
- tools/lint/eslint/eslint-plugin-mozilla/lib/environments/
- https://eslint.org/docs/latest/user-guide/configuring/language-options

Differential Revision: https://phabricator.services.mozilla.com/D153337
2022-08-05 09:58:58 +00:00
Norisz Fay 8e2e05ea96 Merge autoland to central a=merge 2022-08-05 12:27:30 +03:00
Narcis Beleuzu 6acdefa49c Backed out 2 changesets (bug 1780278) for breaking manual action tasks to add or backfill new tasks. a=backout DONTBUILD
Backed out changeset 609afc0ae2f6 (bug 1780278)
Backed out changeset 77a4bc82a9c0 (bug 1780278)
2022-08-05 12:23:27 +03:00
Barret Rennie 069a57c16d Bug 1772925 - Port osfile.jsm to IOUtils in tools/code-coverage/ r=marco
Differential Revision: https://phabricator.services.mozilla.com/D153701
2022-08-04 20:02:54 +00:00
André Bargull 511c96f0dc Bug 1782273 - Part 30: Enable prettier for selfhosted code. r=tcampbell,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D153263
2022-08-04 17:13:03 +00:00
Gerald Squelart f91d94a4c9 Bug 1777431 - Use the same default constants in both profilers - r=florian
The BASE_PROFILER_DEFAULT_...ENTRIES constants in BaseProfiler.h were smaller
than those in ProfilerControl.h, leading to a shorter profiling range in the
parent process!
Now these constants and some other shared ones are only defined in
BaseProfiler.h, and reused in ProfilerControl.h.

PROFILER_DEFAULT_DURATION was moved to where it's first used, and should one
day disappear (see bug 1632365).

Differential Revision: https://phabricator.services.mozilla.com/D153669
2022-08-04 13:59:50 +00:00
Jeff Muizelaar 353c96749e Bug 1783020 - Record WebRender display list building time in PerfStats. r=bas
This repurposes the unused LayerBuilding stat.

Differential Revision: https://phabricator.services.mozilla.com/D153631
2022-08-03 22:40:47 +00:00
Andrew Halberstadt ff1c394678 Bug 1780278 - Update vendored taskgraph to 2.0.0, r=releng-reviewers,hneiva
Differential Revision: https://phabricator.services.mozilla.com/D153644
2022-08-03 21:21:57 +00:00
Ben Dean-Kawamura e965ed0056 Bug 1766045 - Adding mach command to generate UniFFI files r=glandium
Added `mach uniffi generate` which executes `uniffi-bindgen-gecko-js` to
generate UniFFI bindings. It's unfortunate that we need to check these
files in, but I couldn't figure out a way to auto-generate them as part
of the build process.

Adding `#include "nsIContent.h"` to dom/base/nsINodeList.h.  I think
that should have been present before, but things built okay because of
the way things got combined in the uniffied .cpp files. Adding these new
webIDL files bumped `NodeListBinding.cpp` to a new uniffied .cpp file
which caused the build to fail.

Differential Revision: https://phabricator.services.mozilla.com/D144468
2022-08-03 18:59:36 +00:00
Ben Dean-Kawamura 1cf71b7095 Bug 1766045 - Initial work for UniFFI JS bindings r=nika
Generate the C++ and JS code to handle UniFFI bindings.  The WebIDL code
is completely static and doesn't need to be generated.

There's support for both synchronus and async functions, but we haven't
decided the how we want this to be configured.  In practice, almost all
functions will need to be async, so for now we're just forcing all
functions to be.

The `uniffi-bindgen-gecko-js` crate builds the binary that generates the
bindings.  This binary needs to be fed a list of UDL files, the path of
the .cpp file to generate, and the directory to generate .jsm files in
(and also all of those arguments again, but for the test fixtures).
This is quiet a horrible UI, but it's going to be wrapped in a mach
command.

The `uniffi-js` directory contains shared C++ code for
`uniffi-bindgen-gecko-js`.  As much as possible we tried to put the
functionality here and have the generated code simply forward function
calls here.

Still Todo:
  - CallbackInterfaces
  - Custom and external types
  - Datetime and TimeInterval

Differential Revision: https://phabricator.services.mozilla.com/D144472
2022-08-03 18:59:35 +00:00
Rob Lemley e6e7478175 Bug 1782749 - Add "Thunderbird" to Fluent linter's list of brand names. r=linter-reviewers,fluent-reviewers,sylvestre,flod
Differential Revision: https://phabricator.services.mozilla.com/D153530
2022-08-03 15:34:35 +00:00
Butkovits Atila a8ad39a288 Backed out 6 changesets (bug 1766045) for causing build bustages. CLOSED TREE
Backed out changeset 113593df6272 (bug 1766045)
Backed out changeset f137315bb6af (bug 1766045)
Backed out changeset d86ad195a9a0 (bug 1766045)
Backed out changeset e8bc2ec40cff (bug 1766045)
Backed out changeset 2d33e41ac507 (bug 1766045)
Backed out changeset 4d5874e16302 (bug 1766045)
2022-08-03 17:40:30 +03:00
Ben Dean-Kawamura 86a582c07a Bug 1766045 - Adding mach command to generate UniFFI files r=glandium
Added `mach uniffi generate` which executes `uniffi-bindgen-gecko-js` to
generate UniFFI bindings. It's unfortunate that we need to check these
files in, but I couldn't figure out a way to auto-generate them as part
of the build process.

Adding `#include "nsIContent.h"` to dom/base/nsINodeList.h.  I think
that should have been present before, but things built okay because of
the way things got combined in the uniffied .cpp files. Adding these new
webIDL files bumped `NodeListBinding.cpp` to a new uniffied .cpp file
which caused the build to fail.

Differential Revision: https://phabricator.services.mozilla.com/D144468
2022-08-03 13:48:28 +00:00
Ben Dean-Kawamura 703dbdfe3a Bug 1766045 - Initial work for UniFFI JS bindings r=nika
Generate the C++ and JS code to handle UniFFI bindings.  The WebIDL code
is completely static and doesn't need to be generated.

There's support for both synchronus and async functions, but we haven't
decided the how we want this to be configured.  In practice, almost all
functions will need to be async, so for now we're just forcing all
functions to be.

The `uniffi-bindgen-gecko-js` crate builds the binary that generates the
bindings.  This binary needs to be fed a list of UDL files, the path of
the .cpp file to generate, and the directory to generate .jsm files in
(and also all of those arguments again, but for the test fixtures).
This is quiet a horrible UI, but it's going to be wrapped in a mach
command.

The `uniffi-js` directory contains shared C++ code for
`uniffi-bindgen-gecko-js`.  As much as possible we tried to put the
functionality here and have the generated code simply forward function
calls here.

Still Todo:
  - CallbackInterfaces
  - Custom and external types
  - Datetime and TimeInterval

Differential Revision: https://phabricator.services.mozilla.com/D144472
2022-08-03 13:48:27 +00:00
Mark Banner 06e59b0866 Bug 1782008 - Move ESLint test paths definitions to a separate file. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D152734
2022-08-03 11:16:19 +00:00
Christian Holler 53b78333a2 Bug 1782505 - Observe destroyed actors in IPC fuzzing. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D153344
2022-08-02 22:06:28 +00:00
criss 04616ca52e Backed out 2 changesets (bug 1766045) for causing Bp-hybrid failures on UniFFIGeneratedScaffolding.cpp
Backed out changeset 5708672d0e83 (bug 1766045)
Backed out changeset cc77fd5ec7a8 (bug 1766045)
2022-08-03 00:01:58 +03:00
Ben Dean-Kawamura c1816bab45 Bug 1766045 - Initial work for UniFFI JS bindings r=nika
Generate the C++ and JS code to handle UniFFI bindings.  The WebIDL code
is completely static and doesn't need to be generated.

There's support for both synchronus and async functions, but we haven't
decided the how we want this to be configured.  In practice, almost all
functions will need to be async, so for now we're just forcing all
functions to be.

The `uniffi-bindgen-gecko-js` crate builds the binary that generates the
bindings.  This binary needs to be fed a list of UDL files, the path of
the .cpp file to generate, and the directory to generate .jsm files in
(and also all of those arguments again, but for the test fixtures).
This is quiet a horrible UI, but it's going to be wrapped in a mach
command.

The `uniffi-js` directory contains shared C++ code for
`uniffi-bindgen-gecko-js`.  As much as possible we tried to put the
functionality here and have the generated code simply forward function
calls here.

Still Todo:
  - CallbackInterfaces
  - Custom and external types
  - Datetime and TimeInterval

Differential Revision: https://phabricator.services.mozilla.com/D144472
2022-08-02 19:51:47 +00:00
Mark Banner 35f66cd5ae Bug 1780825 - Add ToastNotification to esmify's module list. r=arai
Depends on D152536

Differential Revision: https://phabricator.services.mozilla.com/D152537
2022-08-02 15:07:49 +00:00
Sylvestre Ledru 961144a29f Bug 1762038 - mozlint: Update to pylint v2.13.5 r=linter-reviewers,ahal
Depends on D142376

Differential Revision: https://phabricator.services.mozilla.com/D142171
2022-08-01 17:29:20 +00:00
André Bargull 440ca8257a Bug 1782190: Remove no longer used eslint definitions for js-shell module loader. r=jonco
The shell module loader was rewritten to C++ in bug 1637529.

"jsrtfuzzing-example.js" was changed to appease prettier, now that it's enabled.

Differential Revision: https://phabricator.services.mozilla.com/D153151
2022-07-29 09:44:27 +00:00
Barret Rennie 4ac8dcb4d4 Bug 1772943 - Port osfile.jsm usage to IOUtils in toolkit/mozapps/ r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D148967
2022-07-28 20:21:55 +00:00
Julien Cristau 4c730616cf Bug 1781202 - use the same configs for "mach try release" migrations as for actual merge automation r=releng-reviewers,aki DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D152733
2022-07-28 15:51:34 +00:00
Tooru Fujisawa 2efdd1384f Bug 1780527 - Use ThirdPartyPaths.txt and Generated.txt in mach esmify. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D153067
2022-07-28 12:50:18 +00:00
Gerald Squelart 4ae0198f70 Bug 1774329 - Verify that there are no whitespaces in xpcshell/mochitest profiles - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D152714
2022-07-28 12:41:58 +00:00
Gerald Squelart fc7747606f Bug 1774329 - Add minimal test for GC and CC markers - r=florian
This covers the gc stats' JSONPrinter changes, and would trigger the
verifyJSONStringIsCompact assertion (see next patch) without these changes.

Differential Revision: https://phabricator.services.mozilla.com/D152844
2022-07-28 12:41:58 +00:00
Gerald Squelart 7b301dc561 Bug 1774329 - Rework shared test profiler controls - r=florian
Centralize calls to getProfileDataAsync to stop{,Now}AndGetProfile() in shared-head.js.

Differential Revision: https://phabricator.services.mozilla.com/D152843
2022-07-28 12:41:57 +00:00
Gerald Squelart ad5e9a2a05 Bug 1774329 - Remove JSONWriter style specifications from profiler code - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D152609
2022-07-28 12:41:57 +00:00
Gerald Squelart d4726a9eca Bug 1774329 - If SingleLineStyle is set at construction, also remove spaces after colons and commas - r=florian
These were the last remaining JSON whitespace characters, so we can now our
regression tests can check that there are non of these left.

Differential Revision: https://phabricator.services.mozilla.com/D152607
2022-07-28 12:41:56 +00:00
Gerald Squelart 515c9f0788 Bug 1774329 - Output profiling logs in the most compact json - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D152606
2022-07-28 12:41:56 +00:00
Gerald Squelart a7901e7d31 Bug 1774329 - Use single-line JSONWriters in nsProfiler functions - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D152604
2022-07-28 12:41:55 +00:00
Gerald Squelart dab57bac1d Bug 1774329 - Make BaseProfileJSONWriter single-lined - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D152603
2022-07-28 12:41:54 +00:00
Gerald Squelart 9cb83c13c2 Bug 1774329 - Profiler gtests compute the proportion of JSON whitespace - r=florian
JSON whitespace comprises all spaces and newlines that are not inside strings,
and which could be removed without changing the decoded contents.

This tests the current state of affairs, where JSON whitespace in profiles may
account for up to 25% of the full length.

Differential Revision: https://phabricator.services.mozilla.com/D152601
2022-07-28 12:41:54 +00:00
Bogdan Szekely fea1d4059e Backed out changeset 90a87be826d9 (bug 1780527) for causing build bustages on Generated.txt CLOSED TREE 2022-07-28 15:35:58 +03:00
Tooru Fujisawa 07e3b1f907 Bug 1780527 - Use ThirdPartyPaths.txt and Generated.txt in mach esmify. r=Standard8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D153067
2022-07-28 11:17:41 +00:00
Tooru Fujisawa de340512f3 Bug 1779988 - Part 2: Add ESLint rule that rejects multiple `ChromeUtils.defineESModuleGetters` call on the same object. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152880
2022-07-28 00:54:20 +00:00
Ryan Hunt 5b07c7d827 Bug 1781425 - wasm: Remove baldrdash. r=jseward,supply-chain-reviewers
The baldrdash integration of Cranelift is agreed between SM and CL
to be the wrong shape. Our import of the code base is also old and
causes difficulties for us when upgrading some crates (see bug
1774829). We should remove it for now to unblock bug 1774829.

Differential Revision: https://phabricator.services.mozilla.com/D152806
2022-07-27 22:30:17 +00:00
Jim Blandy 610404dcde Bug 1779829: Replace `Shmem::PrivateIPDLCaller` with `friend` specifiers. r=nika
Instead of using the public member type `PrivateIPDLCaller` to
restrict access to certain `Shmem` member functions, make them
`private`, and designated `IProtocol` and `ITopLevelProtocol` as
friends of `Shmem`.

Differential Revision: https://phabricator.services.mozilla.com/D151952
2022-07-27 19:13:02 +00:00
Mark Banner 58566a1db9 Bug 1777268 - Support structuredClone in the system global by default. r=webcompat-reviewers,twisniewski,kmag
Differential Revision: https://phabricator.services.mozilla.com/D152196
2022-07-26 20:13:52 +00:00
Francesco Lodolo (:flod) 2d85581b2c Bug 1781010: Fluent linter, add checks for hard-coded brand names,r=gregtatum,linter-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D152718
2022-07-26 19:48:08 +00:00
Tooru Fujisawa 5cda6987cf Bug 1780543 - Part 11: Update document for environment. r=Standard8
Depends on D152648

Differential Revision: https://phabricator.services.mozilla.com/D152649
2022-07-26 02:46:32 +00:00
Tooru Fujisawa 972452a602 Bug 1780543 - Part 10: Use SpecialPowers sandbox definition in import-content-task-globals.js. r=Standard8
Also update the list of variables.

Depends on D152647

Differential Revision: https://phabricator.services.mozilla.com/D152648
2022-07-26 02:46:32 +00:00
Tooru Fujisawa 92a8ee55fc Bug 1780543 - Part 9: Move SpecialPowers sandbox global definition into separate file. r=Standard8
Also define Components and Services, that's enabled by default on sandbox.

Depends on D152646

Differential Revision: https://phabricator.services.mozilla.com/D152647
2022-07-26 02:46:32 +00:00
Tooru Fujisawa 4723c60b2c Bug 1780543 - Part 7: Update frame-script and process-script environment. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152432
2022-07-26 02:46:31 +00:00
Tooru Fujisawa a032f53a63 Bug 1780543 - Part 5: Add mozilla/chrome-script environment. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152430
2022-07-26 02:46:30 +00:00
Tooru Fujisawa 9fa82cdffe Bug 1780543 - Part 4: Add mozilla/remote-page environment. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152429
2022-07-26 02:46:30 +00:00
Tooru Fujisawa 4e35a2bf9c Bug 1780543 - Part 3: Add mozilla/process-script environment as alias to frame-script. r=Standard8,perftest-reviewers,webcompat-reviewers,necko-reviewers,twisniewski,sparky,dragana
Differential Revision: https://phabricator.services.mozilla.com/D152428
2022-07-26 02:46:29 +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
Norisz Fay bc693a67ca Backed out changeset c6db198ff02c (bug 1772943) for causing mochitest failures on browser_doorhanger_installs.js CLOSED TREE 2022-07-21 13:10:16 +03:00
Jan de Mooij 4606b0a55c Bug 1780383 - Add profiler sub-category for Wasm frames. r=gerald,rhunt
Differential Revision: https://phabricator.services.mozilla.com/D152272
2022-07-21 06:52:44 +00:00
Jan de Mooij f18ab02529 Bug 1780091 - Use LR register value in the profiler in Mac/Windows ARM64 builds. r=mstange
The Wasm profiling frame iterator uses the return address in the LR register when
interrupting during the prologue. The Linux/Android code was correctly initializing it,
but on Mac and Windows we always used 0.

Differential Revision: https://phabricator.services.mozilla.com/D152268
2022-07-21 06:12:36 +00:00
Barret Rennie ccc656a53b Bug 1772943 - Port osfile.jsm usage to IOUtils in toolkit/mozapps/ r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D148967
2022-07-21 04:44:40 +00:00
andrej 94cf3a15d8 Bug 1778542 - Add components, owners and co-owners to firefox source docs. r=perftest-reviewers,sparky
What we are doing:
Adding a contact section in auto-generated performance testing docs so people know who to contact when they are having an issue with a given module/component

Differential Revision: https://phabricator.services.mozilla.com/D151400
2022-07-20 19:42:41 +00:00
Sylvestre Ledru 73d4a6ca57 no bug - Fix a few typo found by the next version of codespell r=marco
Differential Revision: https://phabricator.services.mozilla.com/D150321
2022-07-20 15:26:22 +00:00
Julien Cristau a6e32108ff Bug 1778728 - update-verify: request non-stale responses from the CDN r=releng-reviewers,jlorenzo DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D151469
2022-07-20 14:28:23 +00:00
Gerald Squelart e396382faf Bug 1779367 - If a shmem cannot be created for a child profile, send a message instead - r=florian
Instead of trying to create a too-big shmem, or if the shmem creation fails,
send a short message starting with '*', which the parent can put into the
profileGatheringLog.

Differential Revision: https://phabricator.services.mozilla.com/D152028
2022-07-20 12:53:00 +00:00
Gerald Squelart 8bd2131359 Bug 1779367 - Don't send shutdown profiles that don't fit in an IPC message - r=florian
Instead of trying to send a too-big message, send a short message starting
with '*', which the parent can put into the profileGatheringLog.

Note: The `CollectProfileOrEmptyString` is now only used by GrabShutdownProfile
(it was previously also used by RecvGatherProfile before it went async). Since
this patch is completely changing its implementation, we may as well fold it
back into its only caller.

Differential Revision: https://phabricator.services.mozilla.com/D152027
2022-07-20 12:53:00 +00:00
Gerald Squelart 06cccd124c Bug 1758643 - Preemptively discard child profiles that would add too much data - r=florian
Instead of throwing away the whole profile at the end if it's too big, we try
to keep as much data as possible, by only throwing away incoming child profiles
that would make the resulting combined full profile too big.

Differential Revision: https://phabricator.services.mozilla.com/D152026
2022-07-20 12:52:59 +00:00
Gerald Squelart 871abc7243 Bug 1758643 - Avoid double allocation when outputting profile JSON - r=florian
Instead of allocating a buffer with the profile and then copying it into an
nsCString (at which point there are two full copies in memory), we resize the
nsCString as needed and directly output the profile data into it.

Differential Revision: https://phabricator.services.mozilla.com/D152025
2022-07-20 12:52:59 +00:00
Gerald Squelart 2eb04e7cbc Bug 1758643 - Check for maximum string length before outputting profile JSON - r=florian
The promise to be resolved may end up in JavaScript, so we check for the
maximum JS string length -- which is under the nsCString max length, so we
won't fail the too-big-string assertion there.

Differential Revision: https://phabricator.services.mozilla.com/D152024
2022-07-20 12:52:59 +00:00
Gerald Squelart 83311bbbd6 Bug 1758643 - ResetGathering now take the nsresult to use in the promise rejection - r=florian
This will be used in the following patches to more easily reject the promise
with a specific code AND reset gathering, in one call.

Differential Revision: https://phabricator.services.mozilla.com/D152023
2022-07-20 12:52:58 +00:00
Gerald Squelart 39a5c27ebd Bug 1779685 - Add useful information to profile.profileGatheringLog.events - r=florian
This may be useful to advanced profiler users, to see how the multi-process
profile gathering went.

(Some information, like missing processes, could be useful to expose to all
users, but this should be done in future tasks, with corresponding front-end
work.)

Note: There are no direct tests, as this is intended for advanced human users,
and the format is not guaranteed to stay stable.

Differential Revision: https://phabricator.services.mozilla.com/D151902
2022-07-20 12:52:58 +00:00
Tooru Fujisawa 39b514ca9a Bug 1780301 - Part 4: Convert ChromeUtils.importESModule at top-level in ESM to static import in ./mach esmify --convert. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152228
2022-07-20 11:34:33 +00:00
Tooru Fujisawa 44f5fff2b9 Bug 1780301 - Part 3: Add option to skip filename filter. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152227
2022-07-20 11:34:32 +00:00
Tooru Fujisawa d62c324450 Bug 1780301 - Part 2: Move functions related to static import into static-import.js. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152226
2022-07-20 11:34:32 +00:00
Tooru Fujisawa 963dc29e7b Bug 1780301 - Part 1: Move some shared functions into utils.js. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152225
2022-07-20 11:34:31 +00:00
Gerald Squelart ef459acb0b Bug 1779513 - Log chunk updates&deletions in the ProfileBufferGlobalController - r=florian
This log goes into `profile.profilingLog[<parent pid>].bufferGlobalController.updates`, an array of data arrays.
See the related `updatesSchema` for what's in those data arrays.

Note: There are no direct tests, as this is intended for advanced human users,
and the format is not guaranteed to stay stable.

Differential Revision: https://phabricator.services.mozilla.com/D151776
2022-07-19 23:42:03 +00:00
Florian Quèze 736d90644e Bug 1778308 - Avoid adding 'nsThreadPool' runnable markers lasting the entire duration of the thread, r=bas,gerald.
Differential Revision: https://phabricator.services.mozilla.com/D151127
2022-07-19 19:00:14 +00:00
Andrew Halberstadt 816f3eeaca Bug 1780087 - [docs] Implement a 'searchfox' role, r=firefox-source-docs-reviewers,sylvestre
See the docstring in this patch for usage examples.

Differential Revision: https://phabricator.services.mozilla.com/D152124
2022-07-19 15:41:07 +00:00
Mark Banner 40adf1ae57 Bug 1780166 - When esmify is moving comments, check that comments on the from node exist. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D152150
2022-07-19 09:34:28 +00:00
Mark Banner a869ce033b Bug 1779989 - Explicitly disallow ES modules in ESLint import-globals-from statements. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D152002
2022-07-19 05:57:15 +00:00
Mark Banner f724fd0ca0 Bug 1779987 - Stop excluding search files from the rejected-words linter. r=mcheang
Differential Revision: https://phabricator.services.mozilla.com/D151999
2022-07-19 05:57:15 +00:00
Gijs Kruitbosch 92d44f3713 Bug 1737043 - add a suggestion for 'example.com' in the network error page for 'example', r=mak,eemeli,desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D129156
2022-07-19 03:27:18 +00:00
Mark Banner c973d7e4a7 Bug 1648286 - When linting, ignore all node_modules directories across the tree not only the top-level ones. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D152009
2022-07-18 20:47:12 +00:00
andrej 4cc772b589 Bug 1779472 - Allow compare selector to use --full for fuzzy. r=ahal
What we are doing:
Giving the fuzzy selector used in the compare selector --full as an option

Why:
By using --full we expand the test list available to the compare selector, and allow all tasks to be run. Without --full we only see a common subset of tasks typically run on moz-central

How we did this:
We are adding in the common_groups = ["task"] line which allowed fuzzy to be run with a general set of args of which one is --full

Differential Revision: https://phabricator.services.mozilla.com/D151837
2022-07-18 18:00:09 +00:00
Tooru Fujisawa a44ee2ceab Bug 1780050 - Rewrite extension when merging single lazy getter call to existing ChromeUtils.defineESModuleGetters. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152084
2022-07-18 17:40:39 +00:00
Tooru Fujisawa 9948edffdf Bug 1779927 - Reuse existing ChromeUtils.defineESModuleGetters when converting lazy getters. r=Standard8
When converting lazy getter calls, if the previous/next statement is
`ChromeUtils.defineESModuleGetters`, add properties into it, instead of
converting the lazy getter call into `ChromeUtils.defineESModuleGetters`
or creating new `ChromeUtils.defineESModuleGetters` call.

Differential Revision: https://phabricator.services.mozilla.com/D151980
2022-07-18 09:22:39 +00:00
Iulian Moraru 5e7070f988 Backed out changeset 89d291a9ee9b (bug 1737043) for causing xpcshell failures on test_URIFixup_check_host.js. CLOSED TREE 2022-07-17 20:47:23 +03:00
Gijs Kruitbosch 393bdf2f46 Bug 1737043 - add a suggestion for 'example.com' in the network error page for 'example', r=mak,eemeli,desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D129156
2022-07-17 16:48:44 +00:00
Kagami Sascha Rosylight bb679fa417 Bug 1769290 - Part 24: Apply mozilla-js-handle-rooted-typedef against layout,security,storage,tools r=andi
Differential Revision: https://phabricator.services.mozilla.com/D151791
2022-07-14 17:00:24 +00:00
Zeid Zabaneh c800d1fef3 Bug 1737634: mots config file r=sheehan
This revision migrates all the content of the following modules:
- Desktop_Firefox
- Toolkit
- Core
- Testing

Up to the their state on Monday June 20th, 2022 in the old system.

The rst file was automatically generated by running `mots export`.

Differential Revision: https://phabricator.services.mozilla.com/D130508
2022-07-14 15:45:44 +00:00
Tooru Fujisawa b9aa9e471a Bug 1779538 - Rewrite ChromeUtils.importESModule with static import in sys.mjs. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D151801
2022-07-14 08:54:01 +00:00
Andi-Bogdan Postelnicu 72ba7fb691 Bug 1519636 - Reformat recent changes to the Google coding style. r=media-playback-reviewers,alwu
Updated with clang-format version 14.0.5 (taskcluster-cAkeFEZXQmihHYDO8Y4hRw)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D151003
2022-07-14 08:10:07 +00:00
Matthew Gaudet edb3b93ed6 Bug 1777529 - Remove Profiler Support for TraceLogger r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D150768
2022-07-13 15:26:47 +00:00
Bogdan Szekely 8e55f13499 Backed out changeset e3ba86211812 (bug 1772943) for causing mochitest failures on browser_html_discover_view.js CLOSED TREE 2022-07-12 13:46:27 +03:00
Barret Rennie 6d73858beb Bug 1772943 - Port osfile.jsm usage to IOUtils in toolkit/mozapps/ r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D148967
2022-07-12 10:09:15 +00:00
Gerald Squelart d09d4ace99 Bug 1779007 - Fix non-MOZ_GECKO_PROFILER build - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D151563
2022-07-12 09:30:30 +00:00
Tooru Fujisawa 0cd8ca1ac9 Bug 1778818 - Add index to are-we-esmified-yet job, and add commit hash and date to the JSON. r=marco
Differential Revision: https://phabricator.services.mozilla.com/D151426
2022-07-11 19:09:43 +00:00
Tooru Fujisawa 1079972361 Bug 1776870 - Integrate esmify script into mach. r=yulia,firefox-static-analysis-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D150494
2022-07-11 14:55:11 +00:00
Tooru Fujisawa 46b5c20706 Bug 1667455 - Part 15: Stop using Services.jsm in eslint testcase. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D150904
2022-07-11 12:41:54 +00:00
Tooru Fujisawa 47c8f80432 Bug 1667455 - Part 6: Stop importing Services.jsm from chrome-priv JS code, non-top-level or multi-line cases. r=kmag,perftest-reviewers,AlexandruIonescu,sparky
Differential Revision: https://phabricator.services.mozilla.com/D150895
2022-07-11 12:41:51 +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
Tooru Fujisawa f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Tooru Fujisawa badd55d158 Bug 1667455 - Part 2: Add Services to system globals in ESLint. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D150891
2022-07-11 12:41:48 +00:00
Julian Seward 49c073aa71 Bug 1777965 - LUL initialisation: inline `DoInstruction` into its calling loop. r=mstange.
When reading Dwarf unwind info, `CallFrameInfo::State::DoInstruction` is
called once per CFI instruction.  At both call sites, the call is driven by a
simple loop.  Because each call doesn't do much work, the call overhead is
quite high, and there are huge numbers of CFI instructions to be processed.

This patch moves the loop into its own method `DoInstructions`, and adds
annotations in the hope of getting `DoInstruction` inlined into the loop.

On an Intel Core i5 1135G7 at circa 4 GHz, this reduces the Dwarf read time
from 0.27 seconds (after bugs 1754932, 1777540 and 1777949 have landed) to
0.26 seconds.  Not much of a win, but on the other hand, the insn count falls
from 3906 million to 3640 million, which seems like a worthwhile win for what
is a trivial change.

Differential Revision: https://phabricator.services.mozilla.com/D151262
2022-07-11 05:08:31 +00:00
Gerald Squelart 12a671a4c4 Bug 1692934 - Record meta.profilingEndTime in each process - r=canaltinova
This profilingEndTime is the time when this property is actually written, which
corresponds to the end of the profiling session.
If it's a shutdown profile, the exact same time is used for the existing
`meta.shutdownTime` property.

Depends on D151355

Differential Revision: https://phabricator.services.mozilla.com/D151356
2022-07-08 14:23:37 +00:00
Gerald Squelart 29a5385f1e Bug 1692934 - Record meta.contentEarliestTime in each process - r=canaltinova
This contentEarliestTime is the time when the earliest (and oldest) surviving
chunk was prepared to start receiving data.
It should be a good hint to the front-end about where the profiling data
actually starts.

Differential Revision: https://phabricator.services.mozilla.com/D151355
2022-07-08 14:23:36 +00:00
Gerald Squelart 1bc597cb95 Bug 1692934 - Record meta.profilingStartTime in each process - r=canaltinova
This profilingStartTime is the time (relative to the process absolute start
time) when the profiling session started.

Differential Revision: https://phabricator.services.mozilla.com/D151354
2022-07-08 14:23:36 +00:00
Julian Seward f79d07a0fb Bug 1777949 - LUL initialisation: don't use `std::map` in `class CallFrameInfo::RuleMap`. r=mstange.
When reading Dwarf unwind info, `CallFrameInfo::RuleMap::registers_` is a
`std::map<int, Rule>` used to map (Dwarf) register numbers to the current
unwind rule for each number.  These mappings are very small (typically <= 7
elems) and very short lived.  Result is that `std::map` creates a lot of
overhead because it is implemented as a Red-Black tree, and hence does a lot
of malloc/freeing of nodes.

This patch replaces it with a simple vector, wrapped up in a new `class
CallFrameInfo::RuleMapLowLevel`.  Comments have also been improved.  The
resulting performance changes are as follows:

                user time    insns     #malloc       #megabytes
                seconds      million   calls         allocated

x86_64 before   0.42         5609      5,891,857     560.8
x86_64 after    0.27         3906        894,188     323.1

arm64  before   0.46         7697      8,469,659     680.8
arm64  after    0.24         4922      1,043,154     427.1

x86_64: Intel Core i5 1135G7, 4.2GHz, Fedora 35
arm64:  Apple M1, ??? MHz, Fedora 33 running on Parallels Workstation

Differential Revision: https://phabricator.services.mozilla.com/D151261
2022-07-08 13:22:22 +00:00
Mark Banner 68920ac756 Bug 1762571 - Update node_modules bundles and package-lock.json files for new node versions. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D147175
2022-07-07 22:09:00 +00:00
Florian Quèze d936ea3ff8 Bug 1778315 - Make power counter names more user friendly, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D151128
2022-07-06 23:36:46 +00:00
Narcis Beleuzu 94e1afa8c3 Backed out 2 changesets (bug 1776104) as requested by Andi
Backed out changeset c2f124ed65ec (bug 1776104)
Backed out changeset 05da7d6fa999 (bug 1776104)
2022-07-06 19:15:18 +03:00
Nika Layzell 7ced96212e Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana
We'll probably want to do something more accurate in the future with a
custom clang static analysis pass which validates that XPIDL interfaces
have the expected vtable and struct layout, however doing so would be
more involved than the string matching done in this patch.

In addition to checking for extra virtual methods, we'll likely also
want to check for data members on interfaces, and reject them unless the
class is marked as `[builtinclass]` in addition to some other attribute
which we'll need to add to prevent them from being implemented in Rust
(as c++ data members will not be reflected by the rust macro).

There were 2 instances of a comment which contained the word 'virtual'
within a CDATA block. These comments were moved out of the CDATA block
to avoid triggering the error.

Differential Revision: https://phabricator.services.mozilla.com/D151068
2022-07-06 14:53:06 +00:00
Julian Seward 6e5e16164d Bug 1777540 - LUL initialisation: inline `CmpExtentsByOffsetLE` so as to speed up sorting of `SecMap::mExtents`. r=mstange.
After parsing Dwarf unwind info, the resulting mExtents array must be sorted
by start address. This forms a significant part of the overall unwind-info
reading cost.

This is done by calling std::sort. Unfortunately the way it is coded, the
comparison function is not inlined, which results in 91 million calls to it
when reading info up to and including for libxul.so.

This small patch turns it into a closure, which is inlined. For (performance)
safety, Extent::offset() is marked inline too.

On an Intel Core i5 1135G7 at circa 4 GHz, this reduces the Dwarf read time
from 0.42 seconds (after bug 1754932 has landed) to 0.35 seconds. Insn count
falls from 5630 million to 4775 million.

Differential Revision: https://phabricator.services.mozilla.com/D150943
2022-07-06 14:03:34 +00:00
Gerald Squelart 7618d829e2 Bug 1777890 - Re-enable the chunk manager logic to limit the global profile buffer memory usage - r=canaltinova
Fix for a regression in bug 1668867, which removed this important line.
Without it, the logic that handles chunk manager updates doesn't run, and the
overall buffer size limit across processes is not enforced anymore.

To catch future regressions, the ProfileBufferGlobalController now adds its
creation timestamp to the profiling log, which can be tested.

Differential Revision: https://phabricator.services.mozilla.com/D150995
2022-07-06 10:01:46 +00:00
Mark Banner 6cc792275f Bug 1777451 - Add a rule to prevent/recommend against using globalThis or window in non-system modules for lazy getters. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D151083
2022-07-06 08:35:59 +00:00
Tooru Fujisawa 4191f0cef6 Bug 1777637 - Part 3: Use plain object for lazy getter in browser/components/urlbar/. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D150934
2022-07-05 23:34:10 +00:00
Jim Blandy 2f5eb12516 Bug 1777656: Delete mozilla::ipc::SharedMemory::SharedMemorytype. r=nika,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D150852
2022-07-05 20:08:31 +00:00
Gerald Squelart 6eab60e869 Bug 1676271 - Profile-gathering log - r=canaltinova
This is a special log that's collected while the parent is gathering all the
JSON profiles (its own, and its children's).
This separate log is necessary, because the gathered logs have already
completed and closed their own `profilingLog` object, and it would be much more
difficult to add to them now.

Differential Revision: https://phabricator.services.mozilla.com/D150562
2022-07-05 10:07:03 +00:00
Gerald Squelart 51ff009005 Bug 1676271 - Per-process profiling log - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D150560
2022-07-05 10:07:03 +00:00
Tooru Fujisawa 8cc73badc6 Bug 1776837 - Part 2: Reject defining lazy getter for module that is already loaded eagerly at top-level. r=mossop
Depends on D150935

Differential Revision: https://phabricator.services.mozilla.com/D150936
2022-07-05 01:01:35 +00:00
Julian Seward 65b11168e8 Bug 1754932 - LUL initialisation: replace `CallFrameInfo::Rule` and 7 children with a fixed-sized structure. r=mstange.
At profiler startup, LUL reads and preprocesses Dwarf unwind info for all
shared objects mapped into the process. That includes libxul.so and around 90
other shared objects on an x86_64-linux build. This takes too long.

Profiling just this reading phase shows a huge number of mallocs and frees
resulting from LulDwarf.cpp. The largest cause of these is the implementation
of a sum-of-products type with 7 variants (CallFrameInfo::*Rule) using C++
inheritance. The variants have different sizes and so have to be boxed (stored
on the heap and referred to by pointers). They are very short lived and this
causes a lot of heap turnover.

For an m-c build on x86_64-linux on Fedora 35 using clang-13.0.0 -g -O2, when
measuring a MOZ_PROFILER_STARTUP=1 run that is hacked so as to exit
immediately after the unwind info for libxul.so has been read, this patch has
the following perf effects:

* run time reduced from 0.50user to 0.41user (Core i5 1135G7, circa 4 GHz)

* heap allocation reduced from 8,087,404 allocs/397,177,435 bytes to
  3,176,936 allocs, 328,204,042 bytes.

* instruction count reduced from 6,848,730,307 to 5,572,028,393.

Main changes are:

* `class CallFrameInfo::Rule` has been completely rewritten, so as to merge
  its 7 children into it, and those children have been removed.  The new
  representation uses just 3 machine words to represent all 7 alternatives.
  The various virtual methods of `class CallFrameInfo::Rule` (`Handle`,
  `operator==`, etc) have been rewritten to use a simple switch-based scheme.

* The code that uses `class CallFrameInfo::Rule` has been changed (but not
  majorly rewritten) so as to pass around instances of it by value, rather
  than pointers to it.  This removes the need to allocate them on the heap.
  To simulate the previous use case where a NULL value had a meaning, the
  revised class in fact has an 8th alternative, `INVALID`, and a routine
  `isVALID`.  INVALID rules are now used in place of NULL pointers to rules as
  previously.

* Accessors and constructors for the revised `class CallFrameInfo::Rule` hide
  the underlying 3-word representation, ensure that the correct
  representational invariants are maintained, and make it impossible to access
  fields that are meaningless for the given variant.  So it's not any less
  safe than the original.

* Additionally, Dwarf expression strings are no longer represented using
  `std::string`.  Instead a new two-word type `ImageSlice` has been provided.
  This avoids all unnecessary (and unknown) overheads with `std::string` and
  provides a significant part of the measured speedup.

Differential Revision: https://phabricator.services.mozilla.com/D139288
2022-07-04 09:19:25 +00:00
Steve Fink 7db6b86519 Bug 1774651 - Add a MinorGC perfstat measurement r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D149556
2022-06-30 17:36:32 +00:00
Steve Fink 4dc8661cff Bug 1774651 - Add a NonIdleMajorGC perfstat measurement r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D149555
2022-06-30 17:36:31 +00:00
Steve Fink f60593707d Bug 1774651 - Add a MajorGC PerfStats metric r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D149554
2022-06-30 17:36:31 +00:00
Joel Maher 7e19d32714 Bug 1777114 - cleanup try presets after removing -fis and -e10s from task labels. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D150518
2022-06-30 16:33:23 +00:00
Iulian Moraru eaae7245b9 Backed out 3 changesets (bug 1762571) for causing xpcshell failures on test_trr_httpssvc_wrap.js. CLOSED TREE
Backed out changeset 9e6eb444acb4 (bug 1762571)
Backed out changeset f24051722cee (bug 1762571)
Backed out changeset 0ead2f6d0582 (bug 1762571)
2022-06-30 18:43:06 +03:00
Mark Banner f316a3e874 Bug 1762571 - Update node_modules bundles and package-lock.json files for new node versions. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D147175
2022-06-30 13:23:25 +00:00
Mark Banner f81acc0ab7 Bug 1646183 - Use ESLint rule reject-importGlobalProperties to reject all imports in system modules. r=arai,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D150354
2022-06-29 22:37:58 +00:00
Mark Banner 05e3f1ea83 Bug 1646183 - Extend ESLint rule reject-importGlobalProperties to also handle defineLazyGlobalGetters. r=arai,webdriver-reviewers,webcompat-reviewers,extension-reviewers,whimboo,twisniewski,kmag
Differential Revision: https://phabricator.services.mozilla.com/D150353
2022-06-29 22:37:57 +00:00
Andrew McCreight 17068ff57b Bug 1776103 - Clean up DMD docs. r=xpcom-reviewers,nika DONTBUILD
I went through the docs and fixed up a few things. I also removed the other
version that was imported under XPCOM, updated a few obsolete MDN links that
now have updated docs, and deleted some ancient Bonsai links.

Differential Revision: https://phabricator.services.mozilla.com/D150504
2022-06-29 21:41:04 +00:00
Florian Quèze 546587141b Bug 1774844 - Record per process power use on Apple Silicon, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D150511
2022-06-29 21:24:12 +00:00
Florian Queze 73d24d0b31 Bug 1774844 - record EMI data as profiler counters, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D149653
2022-06-29 21:24:12 +00:00
Florian Queze e21c8845f3 Bug 1774844 - Add a new 'Power Use' (ie. 'power') profiler feature, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D150059
2022-06-29 21:24:11 +00:00
Andreea Pavel 488ec4bffd Backed out 3 changesets (bug 1774844) for failing condprof at test_ext_geckoProfiler_schema.js on a CLOSED TREE
Backed out changeset f33bef1f7d56 (bug 1774844)
Backed out changeset b4b82b6892b3 (bug 1774844)
Backed out changeset d98352922a5c (bug 1774844)
2022-06-29 18:29:18 +03:00
Florian Quèze 89aec958ac Bug 1774844 - Record per process power use on Apple Silicon, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D150511
2022-06-29 13:29:45 +00:00
Florian Queze 70377e672b Bug 1774844 - record EMI data as profiler counters, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D149653
2022-06-29 13:29:44 +00:00
Florian Queze 07bd81efcd Bug 1774844 - Add a new 'Power Use' (ie. 'power') profiler feature, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D150059
2022-06-29 13:29:44 +00:00
Florian Queze 48b13164be Bug 1775285 - Counters should output a 0 sample at the beginning of a time without change, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D149890
2022-06-29 13:29:43 +00:00
Tooru Fujisawa ffb985c814 Bug 1776828 - Reflect ESM lazy getter to the global. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D150452
2022-06-28 15:45:58 +00:00
Andrew Halberstadt 1bdbe6ed59 Bug 1766316 - [taskgraph] Merge 'util/schema.py' between the two taskgraphs, r=releng-reviewers,aki
Differential Revision: https://phabricator.services.mozilla.com/D150414
2022-06-28 13:12:21 +00:00
Kagami Sascha Rosylight 39d7ee6f91 Bug 1773740 - Part 3: Cover js files including ChromeUtils r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148938
2022-06-27 20:31:33 +00:00
Kagami Sascha Rosylight e984382b9a Bug 1773740 - Part 2: Only handle identifiers pointing to environment globals r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148937
2022-06-27 20:31:33 +00:00
Kagami Sascha Rosylight 8d5a8c8d90 Bug 1773740 - Part 1: Refactor lazy.OS.File/Path detection for ESLint rules use-isInstance/reject-osfile.js r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148936
2022-06-27 20:31:33 +00:00
Ryan VanderMeulen f26cea8874 Bug 1776104 - Remove missing paths from Generated.txt and ThirdPartyPaths.txt. r=andi
Also refresh the list generated from ThirdPartyPaths.txt in
.clang-format-ignore and clean up a few other entries.

Differential Revision: https://phabricator.services.mozilla.com/D150070
2022-06-27 13:05:46 +00:00
Ryan VanderMeulen ce4ab516bb Bug 1776104 - Verify that the paths exist before writing ThirdPartyPaths.cpp. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D150069
2022-06-27 13:05:46 +00:00
Bas Schouten ca4fa2dbfc Bug 1767611 - Part 2: Ensure processes being destroyed report their PerfStats back to the parent for reporting. r=acreskey,nika
This patch aims to be minimally invasive. In order to do this it deals a lot with raw JSON strings. This makes the end product be rather unfortunate indentation wise. Considering this is processed by our testing infrastructure internally at this point it seems reasonable to defer 'prettifying' this, since it would be quite a complicated task.

Differential Revision: https://phabricator.services.mozilla.com/D149949
2022-06-25 16:50:52 +00:00
Bas Schouten 736587816c Bug 1767611 - Part 1: Ensure the current PerfStats collection mask is sent to new child content processes. r=acreskey
Differential Revision: https://phabricator.services.mozilla.com/D149948
2022-06-25 16:50:52 +00:00
Tom Ritter 3bc124d290 Bug 1776512: Fix failing test CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D150287
2022-06-24 20:42:51 +00:00
Tom Ritter 406fcd5384 Bug 1772198 - For rust flavors, ensure the revision is present in the Cargo.lock r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D149310
2022-06-24 20:07:08 +00:00
Tom Ritter 95581da879 Bug 1772198 - Add a lint job that validates moz.yaml files r=linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D149307
2022-06-24 20:07:08 +00:00
Tooru Fujisawa ab853db23f Bug 1773747 - Part 6: Add ESLint rule to check immediately-used lazy getter. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D149867
2022-06-24 11:03:53 +00:00
Tooru Fujisawa 9cd39b4c3d Bug 1774287 - Part 2: Add helpers.getIsTopLevelScript. r=Standard8
Depends on D149606

Differential Revision: https://phabricator.services.mozilla.com/D149607
2022-06-24 11:03:51 +00:00
Tooru Fujisawa 7766271309 Bug 1774287 - Part 1: Add helpers.getIsGlobalThis and use it when handling global variable. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D149606
2022-06-24 11:03:51 +00:00
Tooru Fujisawa 8323efa0ad Bug 1774287 - Part 0: Add extra option to helpers.parseCode to ignore babel config. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D150046
2022-06-24 11:03:50 +00:00