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

5043 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen b615b3fa01 Bug 1712930 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_CHUNKED_RESPONSETYPES_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116075
2021-05-31 12:57:15 +00:00
Toshihito Kikuchi 718f8615db Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-28 22:35:59 +00:00
Noemi Erli e1fde28a85 Backed out 7 changesets (bug 1712930) for causing Android mochitest failures in test_onerror_message.html
Backed out changeset 4b93e808e72f (bug 1712930)
Backed out changeset f1cb609c78a0 (bug 1712930)
Backed out changeset 36e48f6e43ae (bug 1712930)
Backed out changeset b2da173c9337 (bug 1712930)
Backed out changeset d2eb6df1ec5f (bug 1712930)
Backed out changeset 78e1d6847f0a (bug 1712930)
Backed out changeset 6f842a2bf026 (bug 1712930)
2021-05-29 01:30:47 +03:00
Edgar Chen 7b47184b2c Bug 1712930 - Part 7: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116081
2021-05-28 21:12:13 +00:00
Edgar Chen 18ac9679bb Bug 1712930 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_SENDING; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116080
2021-05-28 21:12:13 +00:00
Edgar Chen 5b4acdb4c5 Bug 1712930 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116079
2021-05-28 21:12:12 +00:00
Edgar Chen a60d37c138 Bug 1712930 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_OVERRIDE_MIME_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116078
2021-05-28 21:12:12 +00:00
Edgar Chen 582f4e1fe3 Bug 1712930 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSEXML; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116077
2021-05-28 21:12:12 +00:00
Edgar Chen ffe19c6879 Bug 1712930 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSETEXT; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116076
2021-05-28 21:12:11 +00:00
Edgar Chen b070511ab0 Bug 1712930 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_CHUNKED_RESPONSETYPES_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116075
2021-05-28 21:12:10 +00:00
Alexandru Michis 8fbcd44dc4 Backed out 9 changesets (bug 1695817) for causing bc failures in content/aboutThirdParty.js
CLOSED TREE

Backed out changeset 6b7f451e911e (bug 1695817)
Backed out changeset ad3ea67b3d70 (bug 1695817)
Backed out changeset b4f971059f3f (bug 1695817)
Backed out changeset 9c9a928d4a70 (bug 1695817)
Backed out changeset 4a9bcb38fddf (bug 1695817)
Backed out changeset 48c0eed38628 (bug 1695817)
Backed out changeset 7583675dccb1 (bug 1695817)
Backed out changeset e3f2bed63c33 (bug 1695817)
Backed out changeset 1c45ba4fba61 (bug 1695817)
2021-05-28 21:53:41 +03:00
Toshihito Kikuchi ad10c6f549 Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-28 15:32:31 +00:00
Butkovits Atila 3735a33d14 Backed out 9 changesets (bug 1695817) for causing build bustages. CLOSED TREE
Backed out changeset 49be1caf6501 (bug 1695817)
Backed out changeset 30f1382d6058 (bug 1695817)
Backed out changeset ab9fa7f3b633 (bug 1695817)
Backed out changeset b03b122438cc (bug 1695817)
Backed out changeset 812a6bbfbe0e (bug 1695817)
Backed out changeset 3551230a7522 (bug 1695817)
Backed out changeset c7354b48fbee (bug 1695817)
Backed out changeset 4860450c2e23 (bug 1695817)
Backed out changeset 29dee289f866 (bug 1695817)
2021-05-28 07:52:30 +03:00
Toshihito Kikuchi 562f126952 Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-28 04:19:07 +00:00
Butkovits Atila 711401ea39 Backed out 9 changesets (bug 1695817) for causing failures at browser_all_files_referenced.js. CLOSED TREE
Backed out changeset df4086427aaf (bug 1695817)
Backed out changeset 119a24f8be08 (bug 1695817)
Backed out changeset fd277ae2a7b8 (bug 1695817)
Backed out changeset a2c86a645fa8 (bug 1695817)
Backed out changeset c73705233fc4 (bug 1695817)
Backed out changeset 0a80eea3c0fa (bug 1695817)
Backed out changeset 9af42c7a3ca7 (bug 1695817)
Backed out changeset a2d11a0849d5 (bug 1695817)
Backed out changeset ba3ddcc28cbf (bug 1695817)
2021-05-28 03:05:09 +03:00
Toshihito Kikuchi e8ef8d92ad Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-27 21:14:14 +00:00
Peter Van der Beken 3956d16cb3 Bug 1712725 - Disallow using HoldJSObjects/DropJSObjects for non-nsISupports classes that don't have a CC participant. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D116018
2021-05-27 08:35:41 +00:00
Peter Van der Beken af93c19a09 Bug 1712725 - Pass the correct object to mozilla::DropJSObjects. r=mccr8
Various code was passing 'this' to mozilla::DropJSObjects in unlink, but that's
the CC participant. The right object to pass is 'tmp'. I also added static
asserts in mozilla::Hold/DropJSObjects to block this in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115884
2021-05-27 08:35:40 +00:00
Toshihito Kikuchi 96cdb7c193 Bug 1712693 - Generate a memory report when we detect a low-memory situation. r=gsvelto
This patch reinstate the code to call `SaveMemoryReport` when we enter a low-memory
situation from a normal state, which was removed by bug 1586236.

Differential Revision: https://phabricator.services.mozilla.com/D115960
2021-05-26 17:12:25 +00:00
Gabriele Svelto 1bbc08dfb1 Bug 1712084 - Keep alive the available memory tracker during shutdown r=tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D115599
2021-05-26 13:15:27 +00:00
Edgar Chen eb9e50c536 Bug 1712861 - Get rid of NS_ERROR_DOM_INVALID_ACCESS_XHR_TIMEOUT_AND_RESPONSETYPE_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D115946
2021-05-26 12:12:09 +00:00
Toshihito Kikuchi 0b6b4d9629 Bug 1711610 - Should not trigger the memory pressure event if the available commit space is not low. r=gsvelto
After bug 1586236, we use the memory resource notification object to detect a low
memory situation on Windows, which is signaled when the available physical memory
is low.  If the available physical memory is low, however, it's possible that there
is still commit space enough for the application to run.  In such a situation, we
don't want to make aggressive efforts to reduce memory usage.

This patch makes sure we send the memory pressure event (both New and Ongoing) only
when the available commit space is lower than the threshold value defined by the pref
"browser.low_commit_space_threshold_mb".  Its default value is set to 200MB
based on our telemetry data indicating ~60% of OOM crashes with <100MB, ~75% with <300MB.

To use the pref in `nsAvailableMemoryWatcher`, this patch moves the call to
`AvailableMemoryTracker::Init()` to `XRE_mainRun()`.  It was in `NS_InitXPCOM`
because the old initialization code hooked APIs and needed to be done while
the process has only one thread (bug 741540).  The current `AvailableMemoryTracker`
does not use hooks, so it doesn't have to be initialized that early.

Differential Revision: https://phabricator.services.mozilla.com/D115605
2021-05-24 21:29:46 +00:00
Agi Sferro 114966c6e0 Bug 1701269 - Remove mobile/android/base. r=nalexander,flod,owlish
Differential Revision: https://phabricator.services.mozilla.com/D109918
2021-05-20 22:03:03 +00:00
Edgar Chen 72168631b0 Bug 1710845 - Get rid of NS_ERROR_DOM_INVALID_EXPRESSION_ERR; r=smaug;
Differential Revision: https://phabricator.services.mozilla.com/D114967
2021-05-12 23:32:38 +00:00
Edgar Chen acf4edd8ea Bug 1710840 - Part 2: Get rid of NS_ERROR_DOM_SVG_WRONG_TYPE_ERR; r=smaug
Depends on D114964

Differential Revision: https://phabricator.services.mozilla.com/D114965
2021-05-12 23:32:38 +00:00
Edgar Chen c681831600 Bug 1710840 - Part 1: Get rid of NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE; r=smaug;
Differential Revision: https://phabricator.services.mozilla.com/D114964
2021-05-12 23:32:37 +00:00
Edgar Chen f10ffb593c Bug 1709217 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_VALUE; r=smaug
Depends on D114185

Differential Revision: https://phabricator.services.mozilla.com/D114186
2021-05-11 19:38:46 +00:00
Edgar Chen 22ee127c8b Bug 1709217 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_SUPPORTED; r=smaug
Depends on D114184

Differential Revision: https://phabricator.services.mozilla.com/D114185
2021-05-11 19:38:46 +00:00
Edgar Chen 0362d20990 Bug 1709217 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_STATE; r=smaug
Depends on D114183

Differential Revision: https://phabricator.services.mozilla.com/D114184
2021-05-11 19:38:45 +00:00
Edgar Chen d1ca0306a2 Bug 1709217 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_INDETERM; r=smaug
Depends on D114182

Differential Revision: https://phabricator.services.mozilla.com/D114183
2021-05-11 19:38:45 +00:00
Edgar Chen b6a7d80197 Bug 1709217 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_ENABLED; r=smaug
Depends on D114181

Differential Revision: https://phabricator.services.mozilla.com/D114182
2021-05-11 19:38:44 +00:00
Edgar Chen 567d46362c Bug 1709217 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_EXEC_COMMAND; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D114181
2021-05-11 19:38:44 +00:00
Edgar Chen f8605ff45d Bug 1709214 - Get rid of NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D114179
2021-05-10 12:20:17 +00:00
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Jon Coppeard 52d33f4288 Bug 1709849 - Replace use of JSGCInvocationKind with JS::GCOptions in the browser r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D114512
2021-05-07 07:39:50 +00:00
Jens Stutte f2f68509d3 Bug 1690326: Add mappings for ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL and remove error NS_ERROR_FILE_DISK_FULL in favor of existing NS_ERROR_FILE_NO_DEVICE_SPACE r=xpcom-reviewers,necko-reviewers,nika,valentin
Win32 errors ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL need a mapping.
NS_ERROR_FILE_DISK_FULL is duplicate to NS_ERROR_FILE_NO_DEVICE_SPACE
Drive by: RejectJSPromise lacked some NS_ERROR_* mappings

Differential Revision: https://phabricator.services.mozilla.com/D113974
2021-05-06 14:00:06 +00:00
Toshihito Kikuchi fee87c9b39 Bug 1705579 - Skip WinIOAutoObservation if TLS is not available. r=gerald,aklotz
We hook several file APIs to record I/O performance data.  Since TLS is not
allocated in ntdll's loader worker thread, however, if someone does a file
operation, we hit read AV because `WinIOAutoObservation` uses `nsString` and
a thread local variable.

Currently we can see this crash happens only when a DLL rule of AppLocker is
defined, but theoretically this can happen when any module loaded in a worker
thread does file operation in its entrypoint.

The proposed fix is to skip `WinIOAutoObservation` if TLS is not available.

Differential Revision: https://phabricator.services.mozilla.com/D113032
2021-05-05 17:00:09 +00:00
Steve Fink 600f475b8f Bug 1703374 - Provide SliceBudget users with more control of when and how often time checks happen r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D111008
2021-04-28 16:37:32 +00:00
Valentin Gosu de35210ee3 Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-28 09:33:46 +00:00
Cosmin Sabou 6be9f38faa Backed out changeset a89d4817a3cf (bug 1703374) for causing bustages and SliceBudget related crashes. CLOSED TREE 2021-04-27 02:09:01 +03:00
Steve Fink a559ffee38 Bug 1703374 - Provide SliceBudget users with more control of when and how often time checks happen r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D111008
2021-04-26 22:38:31 +00:00
Narcis Beleuzu 33cc31099d Backed out 8 changesets (bug 1574475, bug 1699222) for build bustages on moz.build . CLOSED TREE
Backed out changeset 6c2c039872b3 (bug 1574475)
Backed out changeset 8a2a04743c5f (bug 1699222)
Backed out changeset 9437c60798d6 (bug 1574475)
Backed out changeset 7ef1884ac11b (bug 1574475)
Backed out changeset ec8c237d5298 (bug 1574475)
Backed out changeset 4a760b3f5d53 (bug 1574475)
Backed out changeset b229b0eea1e7 (bug 1574475)
Backed out changeset 03d34a2f10a6 (bug 1574475)
2021-04-22 18:10:59 +03:00
Valentin Gosu db2d8bb0bc Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-22 13:41:34 +00:00
Gerald Squelart d67d35f1e3 Bug 1704654 - Display MOZ_LOG markers in marker chart as well - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D111742
2021-04-21 08:16:53 +00:00
Mike Hommey 6a41d8d7ad Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-16 04:06:02 +00:00
Doug Thayer 638904c1f1 Bug 1693180 - Ensure we show the skeleton UI when restarting FF r=emalysz
When restarting, we set the XRE_PROFILE_PATH env var. This normally would
prevent us from showing the skeleton UI. This patch just adds another env
var to indicate that we are restarting so the skeleton UI can know it's
safe to display.

Differential Revision: https://phabricator.services.mozilla.com/D111884
2021-04-15 21:31:15 +00:00
Butkovits Atila 8255e3083f Backed out changeset 5c6b15fcea71 (bug 1515229) for causing GTest failures. CLOSED TREE 2021-04-15 13:37:29 +03:00
Mike Hommey 2eacd46d46 Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-14 22:31:36 +00:00
Jens Stutte daaba5a9c6 Bug 1690326: Map Windows error 0x45D ERROR_IO_DEVICE to NS_ERROR_FILE_DEVICE_FAILURE r=janv,xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D112050
2021-04-14 17:29:39 +00:00
smolnar 22c6eb14ba Backed out changeset f7b0cdc3aeb0 (bug 1515229) for causing xpc failures in test_feature_stackwalking. CLOSED TREE 2021-04-14 12:25:37 +03:00
Mike Hommey 133396cb94 Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-14 04:47:09 +00:00
Emma Malysz ebe0b6aade Bug 1704578, cast process info elements as int32_t on linux to avoid integer overflow errors r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D111735
2021-04-13 00:18:39 +00:00
Jon Coppeard 0df0e68efa Bug 1703108 - Don't clear tracing context until after it has been used r=mccr8
This tracing context information is used for CC logging. Don't clear it until
after it's been used.

Differential Revision: https://phabricator.services.mozilla.com/D110900
2021-04-07 07:58:38 +00:00
David Parks 6b176f5987 Bug 1682030 - Remove NPAPI plugin process from GeckoChildProcess r=jld,gsvelto
Eliminates the NPAPI plugin process type from the GeckoChildProcess enum as part of NPAPI removal.  In order to avoid altering enum values when updating the process list, the GECKO_PROCESS_TYPE macro has been updated to include the desired enum value.  We want to resist altering the values as they need to be consistent e.g. in telemetry reports.

We also remove plugins from adjacent spots that need to maintain consistency with GeckoChildProcess -- most notably the nsICrashService.

Differential Revision: https://phabricator.services.mozilla.com/D108689
2021-04-06 19:28:20 +00:00
Csoregi Natalia d68661e2cc Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks 3f9c44a9ed Bug 1682030 - Remove NPAPI plugin process from GeckoChildProcess r=jld,gsvelto
Eliminates the NPAPI plugin process type from the GeckoChildProcess enum as part of NPAPI removal.  In order to avoid altering enum values when updating the process list, the GECKO_PROCESS_TYPE macro has been updated to include the desired enum value.  We want to resist altering the values as they need to be consistent e.g. in telemetry reports.

We also remove plugins from adjacent spots that need to maintain consistency with GeckoChildProcess -- most notably the nsICrashService.

Differential Revision: https://phabricator.services.mozilla.com/D108689
2021-04-05 23:48:43 +00:00
Nick Alexander 166dfa51ee Bug 1700850 - Part 2: Remove temporary background profile directories very late. r=dthayer
When `--backgroundtask TASK` invocations exit, they try to remove
their temporary profile directory.  This mostly works, except there
are some very late writes to the profile directory including
`Telemetry.ShutdownTime.txt` and the `security_state` directory.  This
commit accommodates by moving the profile directory removal even
later.  It might be possible to instead avoid these very late writes,
but that is hard in general, and is more likely to depend on the exact
code invoked by the background task itself.

Differential Revision: https://phabricator.services.mozilla.com/D110472
2021-04-05 04:16:37 +00:00
Toshihito Kikuchi 29312fb769 Bug 1586236 - Use memory resource notifications to detect low memory scenarios on Windows. r=gsvelto
This patch uses the low memory resource notification facility to detect
scenarios where physical memory is running low without polling. This is a
significant change compared to the previous behavior which measured both
available virtual memory (only on 32-bit builds) and available commit space.

Since we're not trying to avoid OOMs anymore we don't save memory reports
anymore when hitting a low-memory condition.

Differential Revision: https://phabricator.services.mozilla.com/D110354
2021-03-31 15:18:05 +00:00
Jens Stutte 288171e26c Bug 1699983: Avoid firing unexpected shutdown observer notification in content process. r=kmag,xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D109675
2021-03-25 18:07:57 +00:00
Simon Giesecke cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke ae75c3faa8 Bug 1601556 - Make Result<V, E> a literal type if V and E are literal types and PackingStrategy is not Variant. r=emilio
Also make CompactPair<A, B> a literal type if A and B are literal types,
and add MaybeStorageBase that ought to be used as a basis of MaybeStorage
in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D55930
2021-03-23 12:35:19 +00:00
Tom Schuster 01d4cafbb1 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-23 11:15:11 +00:00
Simon Giesecke 810d88095a Bug 708901 - Migrate to nsTHashSet in xpcom. r=xpcom-reviewers,kmag
Depends on D109326

Differential Revision: https://phabricator.services.mozilla.com/D109327
2021-03-23 10:36:39 +00:00
Jens Stutte 8560eb86e8 Bug 1690326: Map Windows error 0x570 ERROR_FILE_CORRUPT to NS_ERROR_FILE_FS_CORRUPTED r=xpcom-reviewers,janv,nika
While NS_ERROR_FILE_CORRUPTED already exists, it indicates most of the times more a parsing problem of a given file format.
But Windows ERROR_FILE_CORRUPTED signals a malfunctioning or corrupted file system at OS level, thus we translate it to the new
NS_ERROR_FILE_FS_CORRUPTED.

There seems to be no suitable errno under POSIX to map here.

Differential Revision: https://phabricator.services.mozilla.com/D108793
2021-03-23 10:29:02 +00:00
Bogdan Tara a3fae8602d Backed out 3 changesets (bug 1536094) for causing bug 1700228 CLOSED TREE
Backed out changeset 464143c2b6ac (bug 1536094)
Backed out changeset 3462cb6573b1 (bug 1536094)
Backed out changeset d566c1c9e82f (bug 1536094)
2021-03-23 00:46:34 +02:00
Mike Hommey 4d8e18962b Bug 1699375 - Move WalkTheStack to mozglue. r=nika
A long standing issue is that MOZ_ASSERT and related don't print stack
traces in debug builds when they're directly or indirectly emitted from
non-libxul code. Moving WalkTheStack to mozglue alleviates the problem.

It's also not printing stack traces when emitted from C code (and for
some C third party libraries, we do redirect assert to MOZ_ASSERT),
which we solve by making the corresponding API available without C++
(which WalkTheStack being a static method of the nsTraceRefCnt class
didn't allow, or the use of a closure on Android).

This requires some adjustements to headers that indirectly assume that
Assertions.h includes ErrorList.h through nsError.h through nscore.h
through nsTraceRefcnt.h.

We also remove TestStackCrawl.cpp because it hasn't been built since
bug 158528, 19 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D108913
2021-03-22 21:25:30 +00:00
Mike Hommey 9f69fef1e9 Bug 1699375 - Make MozFormatCodeAddress* return the printed size, and use that instead of strlen. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D108912
2021-03-22 21:25:30 +00:00
Tom Schuster bcb6e45e17 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Cosmin Sabou cac540c776 Backed out 3 changesets (bug 1536094) for causing valgrind failures.
Backed out changeset dfe051a9c91a (bug 1536094)
Backed out changeset c73979442002 (bug 1536094)
Backed out changeset 863933e887e8 (bug 1536094)
2021-03-22 20:34:36 +02:00
Tom Schuster aa320997de Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Steve Fink c8b4a27dc9 Bug 1698172 - Add descriptions to GC markers r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D108249
2021-03-22 16:00:52 +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
Jens Stutte 48b1ebeb71 Bug 1696397: Move SpinEventLoopUntilOrShutdown to -Quit and move the current shutdown state logic from nsThreadManager to AppShutdown; r=kmag,xpcom-reviewers
The SpinEventLoopUntilOrShutdown is interrupted in the main process only at stage "xpcom-shutdown", which is too late. In a content process instead we interrupt it early enough, at "content-child-will-shutdown".

This patch removes the current observer logic in nsThreadManager in favor of a current shutdown phase state machinery in AppShutdown and renames SpinEventLoopUntilOrShutdown to SpinEventLoopUntilOrQuit. It also ensures that SpinEventLoopUntilOrQuit breaks early (at "quit-application" in the main process).

For a further possible cleanup around shutdown state in child and parent process please refer to bug 1697745.

We have no automated test for this edge case, but we have diagnostic telemetry that will tell us if it helps.

Differential Revision: https://phabricator.services.mozilla.com/D107619
2021-03-17 08:07:48 +00:00
Jeff Muizelaar 702bd6eeec Bug 1680402. Use stderr in printf_stderr instead of reopening fd 2. r=glandium
Currently, printf_stderr doesn't show up when running with ./mach run.
This is because we run with -attach-console and that redirects stderr
to a different file descriptor using freopen in UseParentConsole.

The change from just using stderr directly happened in bug 340443 and was done
to avoid some linking issues. That problem doesn't seem to apply anymore so you'd
expect we'd be able to go back to the straightforward implemention that works even
if stderr has been redirected. Unfortunately, Windows takes not buffering
stderr very seriously and fprintf will write out the results character
by character. This can cause log output lines to be intermixed which
breaks log parsing in CI. We keep using fdopen to create a new FILE*
that's buffered but instead of hard coding fd 2, we get the actual fd
that corresponds to stderr using fileno.

The mozglue implementation was cargo culted from xpcom, so we update it
as well.

Differential Revision: https://phabricator.services.mozilla.com/D98550
2021-03-16 20:45:21 +00:00
Simon Giesecke 821c1a5be3 Bug 1692403 - Never inline DeferredFinalize(nsISupports*). r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108172
2021-03-15 16:44:23 +00:00
Nick Alexander 2dd2d5d19d Bug 1694530 - Allow to prepend a distinct header by using MOZ_LOG=prependheader. r=xpcom-reviewers,nika
This is follow-up to Bug 1687549, which added the `maxsize` flag.
That works well, but it's hard to distinguish separate logging
sessions.  This makes it a little easier.

This calls through to a slightly modified `Print`, leveraging the
concurrency correctness of that implementation.  Doing so doesn't
allow great visual distinction, but it's enough.

This produces output like:
```
$ firefox --backgroundtask success --MOZ_LOG prependheader

***

[(null) 1937604: Main Thread]: I/Logger Opening log
*** You are running in background task mode. ***
...
```
and
```
$ firefox --backgroundtask success --MOZ_LOG prependheader,raw

***

Opening log
*** You are running in background task mode. ***
...
```

Differential Revision: https://phabricator.services.mozilla.com/D106224
2021-03-13 00:18:47 +00:00
Peter Van der Beken c1a5f99ad3 Bug 1697900 - Remove unused NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108095
2021-03-12 10:57:15 +00:00
Anny Gakhokidze aa3895af8c Bug 1597427 - Check for recursive subframe loads in the parent process, r=kmag,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D107311
2021-03-11 00:39:37 +00:00
Emilio Cobos Álvarez 2a1828662f Bug 1696507 - Remove support for NO_UNLINK version of cycle collector macros. r=smaug
And fix existing users of course.

The frame loader one is the only one slightly scary (but if it causes
trouble we could make nsObjectLoadingContent::Unlink a no-op).

Differential Revision: https://phabricator.services.mozilla.com/D107269
2021-03-10 19:50:40 +00:00
nchevobbe 269bba81cd Bug 1696856 - [devtools] Move isForwardedFromContentProcess to nsConsoleMessage. r=baku.
Differential Revision: https://phabricator.services.mozilla.com/D107410
2021-03-10 12:44:22 +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
Masayuki Nakano 7af10cee55 Bug 1677566 - part 3: Ignore non-deletable ranges in `HTMLEditor::HandleDeleteSelection()` r=m_kato
For making delete handlers simpler, and set better target ranges to the
corresponding `beforeinput` event, we should ignore non-editable ranges
before handling deletion.

This patch makes editor stop handling deleteion when a range crosses editing
host boundaries.  In this case, Gecko has done nothing, but fired
`beforeinput` event.  Note that Blink deletes editable contents in the range
**until** it meets first non-editable content, but I don't think this is
a good behavior because it makes things complicated.  Therefore, I filed
a spec issue: https://github.com/w3c/editing/issues/283

On the other hand, this behavior change causes different behavior in
https://searchfox.org/mozilla-central/source/editor/libeditor/crashtests/1345015.html

It tries to insert paragraph into `<html>` element, but our editor currently
does not support it.  Therefore, it hits `MOZ_ASSERT`.  Therefore, this patch
added a new check into `HTMLEditor::InsertParagraphSeparatorAsSubAction()`.

Differential Revision: https://phabricator.services.mozilla.com/D107588
2021-03-09 23:57:54 +00:00
Jan de Mooij 2acffb58a7 Bug 1689413 part 17 - Remove ObjectGroup. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D106987
2021-03-06 01:05:26 +00:00
Narcis Beleuzu c21715e694 Backed out 18 changesets (bug 1689413) for wpt failures on Event-subclasses-constructors.html CLOSED TREE
Backed out changeset 2fe249306030 (bug 1689413)
Backed out changeset 4d4d052bf8d3 (bug 1689413)
Backed out changeset a11a96dce11b (bug 1689413)
Backed out changeset d1411da6c254 (bug 1689413)
Backed out changeset 8262ed245e27 (bug 1689413)
Backed out changeset ed3ef7b5c8c8 (bug 1689413)
Backed out changeset 63eb8f93c6d8 (bug 1689413)
Backed out changeset 558e0b0af7b7 (bug 1689413)
Backed out changeset 5595064ffb60 (bug 1689413)
Backed out changeset e15f1a6f5a38 (bug 1689413)
Backed out changeset 95fa0ec36f7a (bug 1689413)
Backed out changeset 80d594d926ad (bug 1689413)
Backed out changeset 22854b710fbf (bug 1689413)
Backed out changeset 4531d5c25694 (bug 1689413)
Backed out changeset f1bb16079c0e (bug 1689413)
Backed out changeset 211c4f80a286 (bug 1689413)
Backed out changeset 6f7514b0a657 (bug 1689413)
Backed out changeset 76db3b04dedd (bug 1689413)
2021-03-06 01:11:29 +02:00
Jan de Mooij 8f52a7a890 Bug 1689413 part 17 - Remove ObjectGroup. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D106987
2021-03-05 19:10:12 +00:00
Simon Giesecke 7c6ccbe4a8 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-05 15:29:49 +00:00
Alexandru Michis 8c28934f09 Backed out changeset c6b72f3c76ba (bug 1676361) for causing bustages in nsSocketTransportService2.cpp
CLOSED TREE
2021-03-04 23:26:04 +02:00
Simon Giesecke e41d350c04 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 17:30:48 +00:00
Noemi Erli 11891059f7 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke 6c371fcc1c Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 16:14:44 +00:00
smolnar 9f8b74a18d Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke e1330cc8f0 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 14:32:15 +00:00
Simon Giesecke a31d898d28 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in xpcom. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106094
2021-03-01 09:59:33 +00:00
Simon Giesecke b399a8194c Bug 1691913 - Add some convenience methods to LookupResult and EntryHandle. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105475
2021-03-01 09:59:29 +00:00
Jens Stutte 1e19379853 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-27 14:38:14 +00:00
Butkovits Atila bb3fe218a4 Backed out changeset be43a81b35f9 (bug 1689953) for causing failure at test_terminator_record.js. CLOSED TREE 2021-02-27 05:03:11 +02:00
Jens Stutte f6d52040b9 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-26 21:33:29 +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 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Simon Giesecke 7c931c97c4 Bug 1689218 - Rename nsBaseHashtable::GetAndRemove to Extract. r=necko-reviewers,dragana
First, it should be called "Lookup" rather than "Get" because it returns
DataType (rather than UserDataType), but that would still be confusing,
since as opposed to other Lookup* methods, it does not return a DataType&
(and obviously, it can't). So "Extract" seems to be a better name, cf.
mozilla::Maybe::extract.

Differential Revision: https://phabricator.services.mozilla.com/D105471
2021-02-22 12:07:48 +00:00
Markus Stange 055d05d001 Bug 1694000 - Ignore "Missing Touches." exception when it bubbles up to the event loop. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D105871
2021-02-20 22:11:34 +00:00
Markus Stange 8f2e19e4c5 Bug 1692401 - Add a NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK macro which actually aborts. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D104962
2021-02-16 22:55:22 +00:00
Markus Stange 355baf5b39 Bug 1692391 - Rename NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK macros, replacing ABORT with IGNORE. These macros just log the exception and move on, without aborting. r=haik
This patch was generated automatically, using the following commands:

```
rg -l 'NS_OBJC_BEGIN_TRY_ABORT_BLOCK' . | xargs sed -i '' -e 's/NS_OBJC_BEGIN_TRY_ABORT_BLOCK/NS_OBJC_BEGIN_TRY_IGNORE_BLOCK/g'
rg -l 'NS_OBJC_END_TRY_ABORT_BLOCK' . | xargs sed -i '' -e 's/NS_OBJC_END_TRY_ABORT_BLOCK/NS_OBJC_END_TRY_IGNORE_BLOCK/g'
```

Differential Revision: https://phabricator.services.mozilla.com/D104960
2021-02-16 22:55:21 +00:00
Markus Stange 9bc888af4a Bug 1692391 - Replace NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK_NIL with the functionally identical NS_OBJC_BEGIN/END_TRY_BLOCK_RETURN(nil). r=haik
This patch was generated automatically, using the following commands:

```
rg -l 'NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL' . | xargs sed -i '' -e 's/NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL/NS_OBJC_BEGIN_TRY_BLOCK_RETURN/g'
rg -l 'NS_OBJC_END_TRY_ABORT_BLOCK_NIL' . | xargs sed -i '' -e 's/NS_OBJC_END_TRY_ABORT_BLOCK_NIL/NS_OBJC_END_TRY_BLOCK_RETURN(nil)/g'
```

Differential Revision: https://phabricator.services.mozilla.com/D104959
2021-02-16 22:55:21 +00:00
Markus Stange c08d2df99d Bug 1692391 - Replace NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK_NSNULL with the functionally identical NS_OBJC_BEGIN/END_TRY_BLOCK_RETURN(nullptr). r=haik
```
rg -l 'NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSNULL' . | xargs sed -i '' -e 's/NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSNULL/NS_OBJC_BEGIN_TRY_BLOCK_RETURN/g'
rg -l 'NS_OBJC_END_TRY_ABORT_BLOCK_NSNULL' . | xargs sed -i '' -e 's/NS_OBJC_END_TRY_ABORT_BLOCK_NSNULL/NS_OBJC_END_TRY_BLOCK_RETURN(nullptr)/g'
```

Differential Revision: https://phabricator.services.mozilla.com/D104958
2021-02-16 22:55:21 +00:00
Markus Stange 56051da2d0 Bug 1692391 - Replace the NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK_NSRESULT macros with the functionally identical NS_OBJC_BEGIN/END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE). r=haik
This patch was generated with the commands:

```
rg -l 'NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT' . | xargs sed -i '' -e 's/NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT/NS_OBJC_BEGIN_TRY_BLOCK_RETURN/g'
rg -l 'NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT' . | xargs sed -i '' -e 's/NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT/NS_OBJC_END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE)/g'
```

Differential Revision: https://phabricator.services.mozilla.com/D104957
2021-02-16 22:55:20 +00:00
Markus Stange 5257db6695 Bug 1692391 - Remove the word ABORT from the NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK_RETURN macros, because these macros don't abort. r=haik,necko-reviewers
This patch was generated automatically with the commands below:

```
rg -l 'NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN' . | xargs sed -i '' -e 's/NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN/NS_OBJC_BEGIN_TRY_BLOCK_RETURN/g'
rg -l 'NS_OBJC_END_TRY_ABORT_BLOCK_RETURN' . | xargs sed -i '' -e 's/NS_OBJC_END_TRY_ABORT_BLOCK_RETURN/NS_OBJC_END_TRY_BLOCK_RETURN/g'
```

Differential Revision: https://phabricator.services.mozilla.com/D104955
2021-02-16 22:55:20 +00:00
Markus Stange fd5389943b Bug 1692391 - Remove NS_OBJC_TRY_EXPR_ABORT macro and replace its use with the block version of the macro. r=haik
This macro was quite misguided, too. If evaluating _e raised an exception, then
the expression value of the block would be an uninitialized value. Super unsafe.
It's a good thing that we don't expect "retain" to ever throw.

Differential Revision: https://phabricator.services.mozilla.com/D104954
2021-02-16 22:55:19 +00:00
Markus Stange 173c610fda Bug 1692391 - Remove NS_OBJC_TRY_ABORT macro and replace its uses with the block version of the macro. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D104953
2021-02-16 22:55:19 +00:00
Markus Stange 7ae49906c4 Bug 1692391 - Remove some unused macros from nsObjCExceptions.h. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D104952
2021-02-16 22:55:19 +00:00
Markus Stange 6b2cc7685c Bug 1692391 - Clean up nsObjCExceptions.h a little bit, and use -[NSException callStackSymbols] instead of manual symbolication. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D104951
2021-02-16 22:55:18 +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
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Simon Giesecke 780a1636a9 Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 15:12:17 +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
Simon Giesecke 8973094ec1 Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 10:04:45 +00:00
Simon Giesecke f701c44a5c Bug 1691894 - Fix EntryHandle to only work with DataType rather than wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika,jonco,valentin
Differential Revision: https://phabricator.services.mozilla.com/D104810
2021-02-12 15:25:40 +00:00
Simon Giesecke 8730386ad9 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in xpcom. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D104195
2021-02-09 18:19:37 +00:00
Kershaw Chang 22a60154b9 Bug 1685942 - Only fallback to original conn info when network error happens r=necko-reviewers,valentin,dragana
Differential Revision: https://phabricator.services.mozilla.com/D102703
2021-02-08 11:46:51 +00:00
Oleg Skoromnik cd2514ec74 Bug 1428742 - use Value::toGCCellPtr and delegating ctr of GCCellPtr. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D103589
2021-02-03 20:13:10 +00:00
Nick Alexander df9c9cd78c Bug 1687549 - Allow to limit MOZ_LOG file with `maxsize:N` when using `append`. r=xpcom-reviewers,kmag
The existing `append` option allows to accumulate logs. The `rotate:N`
option added in Bug 1244306 allows to limit the growth of the log, but
it's both incompatible with `append` and not well suited for a single
cumulative historical log across multiple runs, since it's unclear how
to manage the current log file index across invocations.  Continuously
limiting the file size for each log message is technically
challenging.

This commit pursues a much simpler approach.  When `maxsize:N` is
specified with `append`, before a log file is opened, it "tails" the
file to be at most N // 2 bytes long.  It tries to keep lines intact
at low runtime memory cost, but allows very long lines may be cut.

This implementation wants an atomic file rename operation, which is
supported on Win32 and POSIX OSes only at this time.  On other OSes, a
compile time error will be raised.

Differential Revision: https://phabricator.services.mozilla.com/D103405
2021-02-03 04:35:01 +00:00
Kris Maglione 8ec2442bf5 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 22:24:47 +00:00
Brindusan Cristian e87cc6c9b1 Backed out changeset e4cefba9f87e (bug 1647519) for build bustages in BrowsingContext.cpp. CLOSED TREE 2021-02-03 00:08:53 +02:00
Kris Maglione dc41c70e24 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 21:46:53 +00:00
Mihai Alexandru Michis f2070ec731 Backed out changeset c0ecccf36d56 (bug 1647519) for causing bustages in BrowsingContext.cpp
CLOSED TREE
2021-02-02 22:47:01 +02:00
Kris Maglione e2e8e3c012 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 20:32:04 +00:00
Brindusan Cristian 1f923f4895 Backed out changeset 0395717ea76d (bug 1647519) for build bustages at BrowsingContext.cpp. CLOSED TREE 2021-02-02 22:07:10 +02:00
Kris Maglione 403125cd23 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 19:47:12 +00:00
Jon Coppeard 4234a7dca4 Bug 1689394 - Make updating tracing context information unconditional on the tracer kind r=sfink
One thing we have to do when tracaing is udpate context information (e.g. edge name) if the tracer is a kind that requires it. It's simpler and more efficient to give all tracers this context and perform an unconditional write to the stack.

Mostly we can get away without saving/restoring context information too. This adds AutoClearTracingContext for the one place we need to do this because of nested use of the same tracer while tracing something else.

Differential Revision: https://phabricator.services.mozilla.com/D103500
2021-01-30 11:21:28 +00:00
Masayuki Nakano 796bb2f86e Bug 1689034 - part 1: Get rid of communication part between plugin process and widget in the main process r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103138
2021-01-28 08:23:33 +00:00
Nika Layzell 0ee45e6357 Bug 1689182 - Collect content memory telemetry from the parent process, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D103239
2021-01-28 19:48:03 +00:00
Jon Coppeard 681a1c23e1 Bug 1689140 - Refactor SliceBudget API r=sfink
This patch does several things:
 - make the counter type int64_t like the work budget parameter (the original purpose of this bug)
 - simplify implementation by using a Variant to discriminate between different kinds of budget
 - remove the global initialization
 - remove makeUnlimited() (and replace uses with assignment from SliceBudget::unlimited())
 - add convenience methods to get the original budget parameters
 - add basic API tests

The use of Variant had the consequence that we now have to pass SliceBudget by reference now to make the linter happy.

Differential Revision: https://phabricator.services.mozilla.com/D103318
2021-01-28 19:11:42 +00:00
Caroline Cullen 0290536aaa Bug 1688768 - Enable full shutdown when JS_STRUCTURED_SPEW is enabled. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D103221
2021-01-27 23:40:35 +00:00
Markus Stange c07fa1f602 Bug 1688308 - Add a marker for "Perform microtasks". r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102804
2021-01-22 21:43:16 +00:00
Simon Giesecke c3f51da721 Bug 1686041 - Map unknown Win32 API error codes to a module of its own in nsLocalFileWin. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D102141
2021-01-19 14:35:03 +00:00
Brindusan Cristian 07342ce091 Backed out changeset a4bf5887fc2a (bug 1680402) for being the most likely cause of bug 1686387. a=backout 2021-01-13 06:30:08 +02:00
Jeff Muizelaar b19b4aa8ba Bug 1680402. Use stderr in printf_stderr instead of reopening fd 2. r=glandium
Currently, printf_stderr doesn't show up when running with ./mach run.
This is because we run with -attach-console and that redirects stderr
to a different file descriptor using freopen in UseParentConsole.

The change from just using stderr directly happened in bug 340443 and was done
to avoid some linking issues. That problem doesn't seem to apply anymore so you'd
expect we'd be able to go back to the straightforward implemention that works even
if stderr has been redirected. Unforunately, Windows takes not buffering
stderr very seriously and fprintf will write out the results character
by character. This can cause log output lines to be intermixed which
breaks log parsing in CI. We keep using fdopen to create a new FILE*
that's buffered but instead of hard coding fd 2, we get the actual fd
that corresponds to stderr using fileno.

The mozglue implementation was cargo culted from xpcom, so we update it
as well.

Differential Revision: https://phabricator.services.mozilla.com/D98550
2021-01-12 14:54:48 +00:00
Alexis Beingessner 9a491a3519 Bug 1683730 - Enable full shutdown under tsan. r=decoder
This eliminates all of the thread leaks we had on record, while also increasing
our coverage on the code that's used for testing firefox.

Differential Revision: https://phabricator.services.mozilla.com/D100264
2021-01-08 20:07:04 +00:00
Kartik Gautam 7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Cosmin Sabou 2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam 775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Bob Owen 19d42b3c5b Bug 1683373: Add hasUserCET flag to cpu.extensions in Telemetry Environment. r=dmajor
Depends on D100124

Differential Revision: https://phabricator.services.mozilla.com/D100156
2020-12-19 19:48:29 +00:00
Anny Gakhokidze 0ce6e91045 Bug 1682694 - Add maxFrames arg to nsTraceRefcnt::WalkTheStack, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D99848
2020-12-16 17:44:28 +00:00
Steve Fink a1215827bb Bug 1673756 - Add GCCC subcategories for several phases of CC r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D99737
2020-12-15 16:48:23 +00:00
Jon Coppeard e9109cd545 Bug 1681268 - Remove destroyed zones from the set of zones waiting for GC r=mccr8
This takes account of the fact that zones may be added to the waiting set
during an incremental GC, after the set has been cleared in
CycleCollectedJSRuntime::PrepareWaitingZonesForGC. I considered disallowing
zones to be added to the set during a GC but decided it would be better not to
lose track of poked zones in the usual case where they don't end up getting
destoryed by the current GC.

Differential Revision: https://phabricator.services.mozilla.com/D99072
2020-12-15 09:36:38 +00:00
Jon Coppeard a3c605929b Bug 1681268 - Check zone pointers passed into the API and add a callback for zone destruction r=sfink
This adds assertions that zone pointers passed in refer to zones we know about
and adds and API that's called when zones are destroyed. It also adds some
standard assertions for other related APIs.

Differential Revision: https://phabricator.services.mozilla.com/D99071
2020-12-15 09:36:12 +00:00
Nika Layzell 6d17703514 Bug 1678463 - Part 1: Add _WITH_DELETE_ON_EVENT_TARGET macros to nsISupportsImpl, r=mccr8
This also migrates all existing users of _WITH_MAIN_THREAD_DESTRUCTION to the
new macro in nsISupportsImpl.

Differential Revision: https://phabricator.services.mozilla.com/D97825
2020-12-14 18:30:51 +00:00
Karl Tomlinson 3dc3be09ee Bug 1677888 adjust IncrementalFinalizeRunnable no-op test r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D98121
2020-12-04 14:43:08 +00:00
Razvan Maries c3c2eaa18e Backed out changeset 975163dad54f (bug 1680402) for causing leaks. CLOSED TREE 2020-12-04 07:06:30 +02:00
Jeff Muizelaar 62e7969d1a Bug 1680402. Use stderr in printf_stderr instead of reopening fd 2. r=glandium
Currently, printf_stderr doesn't show up when running with ./mach run.
This is because we run with -attach-console and that redirects stderr
to a different file descriptor using freopen in UseParentConsole.

The change from just using stderr directly happened in bug 340443 and was done
to avoid some linking issues. That problem doesn't seem to apply anymore so we
should be able to go back to the straightforward implemention that works even
if stderr has been redirected. The mozglue implementation was cargo culted from
xpcom, and there wasn't a reason other than that for the fdopen(dup()) there.

Differential Revision: https://phabricator.services.mozilla.com/D98550
2020-12-04 02:46:57 +00:00
Dave Townsend 486e6c4fae Bug 1675329: Add an API for returning an exit code from the application. r=dthayer,necko-reviewers,dragana,nika
Callers can pass an exit code to nsIAppStartup::Quit and it will be returned from the process when
it exits.

Note that I have using uint16_t as the exit code because on Windows the exit code can be a uint and
elsewhere it is an int. A uint16_t will safely convert to either of those and no-one will ever need
more than 64k exit codes!

Differential Revision: https://phabricator.services.mozilla.com/D96857
2020-12-03 20:19:47 +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
Karl Tomlinson fe53cdd395 Bug 1119956 introduce DiscardableRunnable for tasks that might not run but might not implement cancellation r=asuth,sg
Classes that inherit from DiscardableRunnable are only promising that it is OK
for Run() to be skipped, rather than promising that Cancel() is effective.

Differential Revision: https://phabricator.services.mozilla.com/D98117
2020-12-02 09:36:25 +00:00
Andrew McCreight 0652b2582f Bug 1680040 - Remove failure check for CheckAndCreateBloatView() and rename it. r=xpcom-reviewers,nika
CheckAndCreateBloatView() is infallible, so there's no need to check if it
worked.

I also renamed the function to EnsureBloatView() because that better matches the
common practice, and what the function is actually doing.

Finally, I added a small grammar fix.

Differential Revision: https://phabricator.services.mozilla.com/D98342
2020-12-01 21:27:19 +00:00
Karl Tomlinson c308c16f1e Bug 1119956 add override and use NS_IMETHOD for in-class definition r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D98116
2020-12-01 07:11:44 +00:00
Kris Wright fdf4934ae9 Bug 1664916 - Add rosetta status for about:support r=fluent-reviewers,haik,Gijs
This commit adds a rosetta status to three different places:
- `nsSystemInfo`, to check for rosetta status per apple specifications. We also use the same check in `nsCocoaFeatures` in D89961.
- `Troubleshoot.jsm`, to add rosetta status data (should it exist) to use in about:support
- `About:Support` itself, if the device is running MacOS

Differential Revision: https://phabricator.services.mozilla.com/D94930
2020-11-23 19:36:29 +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 d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Simon Giesecke 4e35a182cf Bug 1676363 - Remove unnecessary includes from xpcom/base/nsCycleCollectionTraversalCallback.h. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96550

Depends on D96549
2020-11-23 16:09:59 +00:00
Simon Giesecke 37f81e847d Bug 1676363 - Remove unnecessary includes from xpcom/base/nsCycleCollectionParticipant.h. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96549

Depends on D96547
2020-11-23 16:09:54 +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
smolnar 93595da8db Backed out changeset d57553438d94 (bug 1675329) for causing bustages in nsAppShell. CLOSED TREE 2020-11-20 22:37:39 +02:00
Dave Townsend a3cb03324e Bug 1675329: Add an API for returning an exit code from the application. r=dthayer,necko-reviewers,dragana,nika
Callers can pass an exit code to nsIAppStartup::Quit and it will be returned from the process when
it exits.

Note that I have using uint16_t as the exit code because on Windows the exit code can be a uint and
elsewhere it is an int. A uint16_t will safely convert to either of those and no-one will ever need
more than 64k exit codes!

Differential Revision: https://phabricator.services.mozilla.com/D96857
2020-11-20 19:13:34 +00:00
Narcis Beleuzu d33e9a8fc8 Backed out changeset 189c8d74af36 (bug 1664916) for bc failure on browser_Troubleshoot.js. CLOSED TREE 2020-11-20 00:12:10 +02:00
Kris Wright 97e68c3664 Bug 1664916 - Add rosetta status for about:support r=fluent-reviewers,haik,Gijs
This commit adds a rosetta status to three different places:
- `nsSystemInfo`, to check for rosetta status per apple specifications. We also use the same check in `nsCocoaFeatures` in D89961.
- `Troubleshoot.jsm`, to add rosetta status data (should it exist) to use in about:support
- `About:Support` itself, if the device is running MacOS

Differential Revision: https://phabricator.services.mozilla.com/D94930
2020-11-19 18:22:15 +00:00
Emilio Cobos Álvarez b6f669bb2d Bug 1678111 - Make nsMemoryReporterManager::GetOrCreate return the add-reffed reference. r=mccr8
This is the safe thing to do, since it can be called from multiple
threads, so in theory it could die just before the caller addrefs it again.

Differential Revision: https://phabricator.services.mozilla.com/D97486
2020-11-18 22:56:48 +00:00
Gerald Squelart b3314a1582 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-18 21:56:57 +00:00
Gerald Squelart 423c352bcc Bug 1675409 - Migrated GC markers to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96046
2020-11-18 21:50:43 +00:00
Gerald Squelart 4d9cfb4113 Bug 1675409 - Migrated LogMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96039
2020-11-18 21:47:24 +00:00
Razvan Maries b7eeb731df Backed out 23 changesets (bug 1675409) for build bustages on Preferences.cpp. CLOSED TREE
Backed out changeset c1a131a55767 (bug 1675409)
Backed out changeset 47d210802a5d (bug 1675409)
Backed out changeset e8ebb1c58d30 (bug 1675409)
Backed out changeset 69a1e9aeff2a (bug 1675409)
Backed out changeset 68f330b387a8 (bug 1675409)
Backed out changeset e4750d9ef5a1 (bug 1675409)
Backed out changeset bb6bb71e5ab3 (bug 1675409)
Backed out changeset 988d7f4716df (bug 1675409)
Backed out changeset ca41382e891c (bug 1675409)
Backed out changeset 90f3fbbbbeda (bug 1675409)
Backed out changeset 9b109d61a6f6 (bug 1675409)
Backed out changeset 3dd66abfdaa2 (bug 1675409)
Backed out changeset 44181df5f0db (bug 1675409)
Backed out changeset bb2603d947fc (bug 1675409)
Backed out changeset 97055cf20a56 (bug 1675409)
Backed out changeset f88fcf09de0d (bug 1675409)
Backed out changeset 7963e1c49786 (bug 1675409)
Backed out changeset 4c379c1061c3 (bug 1675409)
Backed out changeset b8be8ae7da63 (bug 1675409)
Backed out changeset 0b90aa89421e (bug 1675409)
Backed out changeset c10fb46467c9 (bug 1675409)
Backed out changeset 894ac233b290 (bug 1675409)
Backed out changeset 075d1d8e34c2 (bug 1675409)
2020-11-18 20:06:28 +02:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Gerald Squelart ced008cc9f Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 22:26:20 +00:00
Gerald Squelart a26b5d751f Bug 1675409 - Migrated GC markers to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96046
2020-11-17 22:20:04 +00:00
Gerald Squelart c76eb1b69b Bug 1675409 - Migrated LogMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96039
2020-11-17 22:16:49 +00:00
Mihai Alexandru Michis c0d25b01b2 Backed out 24 changesets (bug 1666566, bug 1675409) for causing hazard failures in profiler/core/platform.cpp
CLOSED TREE

Backed out changeset 4d8af8533fd4 (bug 1666566)
Backed out changeset f031a3a8a20f (bug 1675409)
Backed out changeset 2b7e1a031921 (bug 1675409)
Backed out changeset bda5a24b2d0a (bug 1675409)
Backed out changeset 4282e2284314 (bug 1675409)
Backed out changeset 0637f1b26e9f (bug 1675409)
Backed out changeset 67ae04c8f607 (bug 1675409)
Backed out changeset 6c7b3f3618ef (bug 1675409)
Backed out changeset 2f325c22d169 (bug 1675409)
Backed out changeset 1e48ff70ad8f (bug 1675409)
Backed out changeset 1dfc32d6871d (bug 1675409)
Backed out changeset 4f1f218a777b (bug 1675409)
Backed out changeset e6ac8722b38e (bug 1675409)
Backed out changeset cf132e15fb57 (bug 1675409)
Backed out changeset a126e6b00ba9 (bug 1675409)
Backed out changeset fbc7fbb04f33 (bug 1675409)
Backed out changeset 554c69681474 (bug 1675409)
Backed out changeset 44d0521c701f (bug 1675409)
Backed out changeset 04653dfe4720 (bug 1675409)
Backed out changeset 41ca2c043a00 (bug 1675409)
Backed out changeset 264ae4c805d4 (bug 1675409)
Backed out changeset 5f3bbdac0d52 (bug 1675409)
Backed out changeset 11311c11a6e8 (bug 1675409)
Backed out changeset 0355fbc44baf (bug 1675409)
2020-11-17 19:31:28 +02:00
Gerald Squelart f8c24dd6a4 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 11:40:46 +00:00
Gerald Squelart a2779e6b9f Bug 1675409 - Migrated GC markers to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96046
2020-11-17 11:34:42 +00:00
Gerald Squelart 374448fe41 Bug 1675409 - Migrated LogMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96039
2020-11-17 11:31:37 +00:00
Haik Aftandilian 04e352768f Bug 1677029 - With universal builds on Apple Silicon, first launch of the GMP process is slow r=bryce,spohl
Like Chromium, use the undocumented rosetta_translate_binaries function from
libRosetta.dylib to pre-translate XUL and the plugin file at browser startup
to reduce translation delays incurred when starting an x64 plugin process.

All changes #ifdef'd to Mac ARM64.

Differential Revision: https://phabricator.services.mozilla.com/D97105
2020-11-16 22:34:31 +00:00
Karl Tomlinson 332494e855 Bug 1213512 remove unused NS_ERROR_DOM_FILE_ABORT_ERR r=baku
Depends on D95967

Differential Revision: https://phabricator.services.mozilla.com/D95968
2020-11-13 07:55:31 +00:00
Olli Pettay 479b3d0bb9 Bug 1676997 - null check callback in PromiseJobRunnable::Suppressed(), r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D96949
2020-11-13 14:27:16 +00:00
Haik Aftandilian 0c4a7d9835 Bug 1675441 - Use an x64 Widevine GMP Process for Apple Silicon Native Builds r=bryce,spohl
When running as a "universal" build, use an x64 GMP child process if the CDM library is an x64 binary.

Use ifdefs extensively to reduce risk to Intel builds if the fix needs to be uplifted.

Requires a server-side balrog change to serve an Intel Widevine binary to ARM browser versions.

Differential Revision: https://phabricator.services.mozilla.com/D96288
2020-11-11 02:37:57 +00:00
Andrew McCreight f5090a8a7a Bug 1673432 - Add comment about minimizeMemoryUsage being async. r=kmag DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D94755
2020-11-03 21:54:46 +00:00
David Teller 72a77b9404 Bug 1426219 - TypeError is not a developer error anymore;r=yulia
This patch is part of an ongoing work to help our test suite show developer errors that are currently being swallowed by `try { ... } catch (e) { ... }`.

Previous patches in the work used the heuristic that all instances of `TypeError`, `SyntaxError` and `ReferenceError` are developer errors unless specified otherwise. As it turns out, we are throwing `TypeError` in many cases that are not type errors. Since we have no manner of distinguishing which of these cases are actual (developer) errors and which are runtime exceptions, this patch removes `TypeError` from the list of developer errors.

Ideally, a followup patch would carefully reactivate `TypeError`, with a mechanism to annotate which actually represent type errors (typically, those thrown by SpiderMonkey or `throw new TypeError`) and which do not (typically, most of the instances of `TypeError` thrown by DOM operations).

Differential Revision: https://phabricator.services.mozilla.com/D95276
2020-10-30 11:34:37 +00:00
Benjamin Beurdouche dd15a05890 Bug 1665295 - Remove unnecessary assertion on getting nsICertStorage on AppShutdown. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D91890
2020-10-27 15:24:46 +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
Jeff Walden eadce53226 Bug 1672556 - |NS_INLINE_DECL_REFCOUNTING_INHERITED(Class, Super)| should |using| in |Super|'s |AddRef| and |Release| functions, so that |Class::AddRef| and |Class::Release| are unambiguous whether or not refcount logging is in effect. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D94398
2020-10-22 07:41:47 +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
Jon Coppeard 855b11ec23 Bug 1668825 - Change VisitGrayWrapperTargets API to take a tracer rather than a callback r=sfink
This API is only used in one place, with a callback that calls into a tracer,
so we can make this take a tracer in the first place and cut out one level of
indirection.

Depends on D93152

Differential Revision: https://phabricator.services.mozilla.com/D93153
2020-10-12 19:06:16 +00:00
Kartikaya Gupta 6d47eac4ee Bug 1666802 - Remove LayersLogging.*. r=mattwoodrow
The remaining functions are moved to be with their brethren in xpcom.

Differential Revision: https://phabricator.services.mozilla.com/D93146
2020-10-11 21:20:46 +00:00
Paul Bone 76a1ce49fa Bug 1656155 - pt 3. Report bin stats in about:memory r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D85727
2020-10-08 22:43:18 +00:00
Paul Bone 46597c49d2 Bug 1656155 - pt 2. Provide bin usage stats in jemalloc_stats r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D85726
2020-10-08 22:42:45 +00:00
Jon Coppeard 7e8b185cb1 Bug 1668825 - Move trace options into a separate options class passed when the tracer is created r=sfink
I gave TraceOptions some implicit consturctors to make it easier to set a
single option by passing an enum value.

Differential Revision: https://phabricator.services.mozilla.com/D92596
2020-10-08 14:39:00 +00:00
Valentin Gosu ca7456a2d0 Bug 1669813 - Pass %s format to VsprintfLiteral instead of logged string r=dragana
ExternMozLog treated aMsg as a format, instead of the string being printed.
If it happened to contain any escape sequences, it led to a crash as the parameters weren't there.

Differential Revision: https://phabricator.services.mozilla.com/D92886
2020-10-08 10:17:12 +00:00
Razvan Maries 7ed0fd1168 Backed out 2 changesets (bug 1668825) for build bustages on TracingAPI.h. CLOSED TREE
Backed out changeset 5bc8cb307c61 (bug 1668825)
Backed out changeset 0e6a88c27779 (bug 1668825)
2020-10-07 14:34:10 +03:00
Simon Giesecke ad1cc7d864 Bug 1667014 - Improve output of NS_DebugBreak. r=xpcom-reviewers,nika
- Increase maximum message length
- Ensure that file/line output is using the file:line style such that IDEs and
  other tools can easily link it to the source code locations

Differential Revision: https://phabricator.services.mozilla.com/D91239
2020-09-29 15:49:54 +00:00
Jon Coppeard 71a2c7b27d Bug 1668825 - Move trace options into a separate options class passed when the tracer is created r=sfink
I gave TraceOptions some implicit consturctors to make it easier to set a
single option by passing an enum value.

Depends on D92595

Differential Revision: https://phabricator.services.mozilla.com/D92596
2020-10-06 18:10:01 +00:00
Sylvestre Ledru d9cd198ba1 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D92459
2020-10-06 16:12:00 +00:00
Jon Coppeard 6550bf91b1 Bug 1668825 - Remove unused onChild return value r=sfink
This isn't used anywhere so we can make onChild void.

Differential Revision: https://phabricator.services.mozilla.com/D92257
2020-10-05 07:55:13 +00:00
Jon Coppeard 1d5db9bf4c Bug 1668825 - Split out tracing context information into a separate class r=sfink
This gives JSTracer a nullable pointer to a JS::TracingContext. This will only be set for CallbackTracers.

Differential Revision: https://phabricator.services.mozilla.com/D92256
2020-10-05 07:54:40 +00:00
Jon Coppeard 070d9db800 Bug 1668825 - Combine TracerKindTag and TracerKind r=sfink
Currently we have two different enums that determine the tracer kind. Combine
this into a single enum and move it to the JS namespace.

Differential Revision: https://phabricator.services.mozilla.com/D92253
2020-10-05 07:53:38 +00:00
Jon Coppeard f2905d4d6e Bug 1668825 - Rename WeakMapTraceKind to WeakMapTraceAction and make it an enum class r=sfink
The instances of this are called 'actions' everywhere and I think it makes
sense that the type should be called that. Also make it an enum class and move
it into the JS namespace.

Differential Revision: https://phabricator.services.mozilla.com/D92252
2020-10-05 07:52:59 +00:00
Valentin Gosu cd32ff2743 Bug 1589337 - Use nsIClassInfoImpl in nsStandardURL and children r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D90258
2020-09-29 11:41:44 +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
Valentin Gosu 32d406eed2 Bug 1589337 - Use nsIClassInfoImpl in DefaultURI r=necko-reviewers,xpcom-reviewers,kershaw,sg
Differential Revision: https://phabricator.services.mozilla.com/D90254
2020-09-29 11:40:28 +00:00
Simon Giesecke e003e4d581 Bug 1667019 - Simplify moving of Results for PackingStrategy NullIsOk. r=emilio
No longer reset a moved-from Result to an error state, which required
UnusedZero<E>::GetDefaultValue, which was somewhat confusing, and might
also be inefficient. Leaving Result in a valid state, which might be a
success or error state is sufficient.

Differential Revision: https://phabricator.services.mozilla.com/D91250
2020-09-29 08:09:02 +00:00
Markus Stange fb91479c33 Bug 1667461 - Add a note about class name collisions. r=nika,xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D91473
2020-09-25 20:35:13 +00:00
Christoph Kerschbaumer 9abdc0cc16 Bug 1667326: Remove unnecessary pref for SRI. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D91399
2020-09-25 10:04:08 +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
Kris Maglione afcc0476d6 Bug 1663747: Part 1 - Fix sCurrentShutdownPhase and add PastShutdownPhase() API. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89809
2020-09-22 17:13:27 +00:00
Mihai Alexandru Michis a9f468308c Backed out 2 changesets (bug 1663747) for causing xpcshell failures in ThrottledEventQueue.
CLOSED TREE

Backed out changeset 643aa6baf458 (bug 1663747)
Backed out changeset 491472fe44f4 (bug 1663747)
2020-09-22 03:54:59 +03:00
Kris Maglione 5ae4ea4f07 Bug 1663747: Part 1 - Fix sCurrentShutdownPhase and add PastShutdownPhase() API. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89809
2020-09-21 19:18:43 +00:00
Emilio Cobos Álvarez 80ac071f55 Bug 1665373 - Remove nsCountedRef. r=xpcom-reviewers,nika
It has no users after the previous patches.

Depends on D90400

Differential Revision: https://phabricator.services.mozilla.com/D90401
2020-09-17 00:50:56 +00:00
Simon Giesecke 59cd4601d7 Bug 1663902 - Avoid gcc emitting lots of static constructors for UnusedZero<T&>::defaultValue. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D90359
2020-09-16 13:58:49 +00:00
Valentin Gosu 7de4c8009c Bug 1525854 - TRR shouldn't fallback to DNS on DNSSEC error r=necko-reviewers,dragana
This patch adds support for the Extended DNS Errors draft code.
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-extended-error-16

While not yet in the draft, it seems the OPT code for Extended DNS Error is 15
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11

The list of errors for which we hard fail isn't necessarily final.
I picked the errors that indicate a DNSSec failure, or an intentional
filtering done by the resolver.

Differential Revision: https://phabricator.services.mozilla.com/D87698
2020-09-15 10:39:07 +00:00
Razvan Maries c8e604eb78 Backed out 4 changesets (bug 1660970, bug 1525854, bug 1663657, bug 1645108) for perma failures on test_trr_additional_section.js. CLOSED TREE
Backed out changeset ad6c2e8af09b (bug 1663657)
Backed out changeset 419e26e3f452 (bug 1525854)
Backed out changeset 55bf856faf33 (bug 1660970)
Backed out changeset c543a3a008fa (bug 1645108)
2020-09-15 02:35:05 +03:00
Valentin Gosu 26af33d4cc Bug 1525854 - TRR shouldn't fallback to DNS on DNSSEC error r=necko-reviewers,dragana
This patch adds support for the Extended DNS Errors draft code.
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-extended-error-16

While not yet in the draft, it seems the OPT code for Extended DNS Error is 15
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11

The list of errors for which we hard fail isn't necessarily final.
I picked the errors that indicate a DNSSec failure, or an intentional
filtering done by the resolver.

Differential Revision: https://phabricator.services.mozilla.com/D87698
2020-09-14 21:42:02 +00:00
Doug Thayer 025f5fb9f0 Bug 1656261 - Back out all recent StartupCache work r=RyanVM
This backs out all work from bug 1627075 as well as all of its
descendents. There were a few conflicts when backing this out but
overall it was pretty clean, so I would say it's a fairly mild
level of risk. Historically Nathan Froyd has reviewed these patches,
but he is no longer at Mozilla, and no one else is particularly
familiar with the code, so I am passing this off to RyanVM who has
at least been familiar with the history of the bug.

Differential Revision: https://phabricator.services.mozilla.com/D90096
2020-09-14 17:00:53 +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
Stefan Zabka ad4b2fd4e0 Bug 1663946 - Changed link to nsCOMPtr manual. r=froydnj DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D89616
2020-09-09 15:37:58 +00:00
Simon Giesecke c79903419a Bug 1663613 - Add missing include directive in generated ErrorList.h. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D89432
2020-09-08 11:29:17 +00:00
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Simon Giesecke 8f8dc7744e Bug 1661242 - Declare nsCOMPtr_base::begin_assignment MOZ_ALWAYS_INLINE in release builds. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D89248
2020-09-03 14:45:09 +00:00
Simon Giesecke 2d21df0e59 Bug 1661428 - Support PackingVariant::NullIsOk also with non-trivially-default-constructible V. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88444
2020-09-03 14:14:41 +00:00
Emily McDonough 22fb22631b Bug 1662518 part 1 - Add semver to gkrust_util r=emilio
We will use this for CUPS version parsing.

Differential Revision: https://phabricator.services.mozilla.com/D89034
2020-09-02 23:49:02 +00:00
Edgar Chen 2990a39c60 Bug 1662124 - element.setPointerCapture should throw NotFoundError if the pointer id is invalid; r=smaug
https://github.com/w3c/pointerevents/issues/256

Differential Revision: https://phabricator.services.mozilla.com/D88859
2020-09-01 09:13:56 +00:00
Narcis Beleuzu 390c295af2 Backed out changeset 0f0b1fa85339 (bug 1662124) for morchitest failures on test_bug1080361.html . CLOSED TREE 2020-09-01 00:07:28 +03:00
Edgar Chen 259f4671dd Bug 1662124 - element.setPointerCapture should throw NotFoundError if the pointer id is invalid; r=smaug
https://github.com/w3c/pointerevents/issues/256

Differential Revision: https://phabricator.services.mozilla.com/D88859
2020-08-31 19:10:23 +00:00
Jeff Gilbert 5ebfd8fd7e Bug 1662214 - Add docstring for HoldJSObjects. r=mccr8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D88891
2020-08-31 19:01:45 +00:00
Jan Beich fc23f1f2f4 Bug 1661274 - Unbreak Gtk build on non-Linux after bug 1652813;r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88537
2020-08-28 12:51:56 +00:00
David Teller b6b4a2fb84 Bug 1652813 - Provide an API to get the resident unique memory of a process without waking it up;r=njn
Differential Revision: https://phabricator.services.mozilla.com/D83623
2020-08-20 13:57:40 +00:00
Andrew McCreight 4e95b07530 Bug 1653671 - Add aMinimizeMemoryUsage argument to dumpMemoryReportsToNamedFile(). r=froydnj
This functionality already exists, so it is just a matter of threading
an extra bool around. This patch should not actually change the behavior
anywhere.

The goal of this is to consider using it for AWSY. Currently AWSY
asks every process to minimize memory usage at once, but with
this option the minimization will be batched along with the memory
reports, which should make it less likely to overwhelm the system
when there are a lot of content processes.

Differential Revision: https://phabricator.services.mozilla.com/D87475
2020-08-21 17:11:03 +00:00
Emilio Cobos Álvarez be4a7bd00e Bug 1657706 - Forward-declare JSContext in nsrootidl.idl. r=nika
Right now we don't do that so stuff using implicit_jscontext compiles
just by chance.

Differential Revision: https://phabricator.services.mozilla.com/D86249
2020-08-07 16:45:16 +00:00
Sylvestre Ledru 843f943758 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D85678
2020-08-02 15:29:15 +00:00
Chris Martin 133b9692b1 Bug 1652561 - Refactor nsLookAndFeel::GetFontImpl() to prepare for remoting r=jmathies
Currently, this code creates large and non-trivial classes that will be
difficult to remote. This change creates an intermediate stage where a simple
struct is returned from a function and then used to initialize these
more complex classes.

It is this simple struct that will be remoted across processes

Differential Revision: https://phabricator.services.mozilla.com/D83405
2020-07-31 17:32:57 +00:00
Jeff Walden 598c0ab898 Bug 1656411 - Move various dumping functions out of jsfriendapi.h to a new header. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D85522
2020-07-31 16:20:19 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Nathan Froyd 964b206f6c Bug 1654796 - use member initializers for nsMemoryReporterManager structures; r=njn
The current use of `PodZero` (`memset`) triggers `-Wclass-memaccess`
warnings, and member initializers are arguably nicer.

Differential Revision: https://phabricator.services.mozilla.com/D84690
2020-07-24 00:40:41 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Jon Coppeard f47569e9d9 Bug 1654523 - Insist that iteration callbacks don't GC r=sfink,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D84500
2020-07-23 02:31:57 +00:00
Simon Giesecke 7383616e5f Bug 1653230 - Remove unnecessary includes from CycleCollectedJSContext.h. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D83770
2020-07-22 15:09:48 +00:00
Paul Bone 291ecec432 Bug 1482089 - pt 1. Remove DOM code for processing GCTelemetry r=mccr8
This code glues the JS GC code that creates the telemetry with a JS module
that processes it.  This patch removes this code unhooking these
components.

Differential Revision: https://phabricator.services.mozilla.com/D84163
2020-07-21 05:18:28 +00:00
Jon Coppeard b975de8947 Bug 1648453 - Use CallbackObject to trigger cleanup while setting up the incumbent global r=smaug
This also factors out FinalizationRegistry support into a separate class.

The JS engine now passes a callback function and the incumbent global which are recorded in QueueCallback. FinalizationRegistryCleanup::DoCleanup creates a CallbackObject can calls it immediately (I originally tried creating it in QueueCallback but there were problems because this is called during GC).

I coped most of this from the way promise reaction jobs work. I added FinalizationRegistryCleanupCallback; I don't know if that's overkill.

Differential Revision: https://phabricator.services.mozilla.com/D83614
2020-07-17 17:34:46 +00:00