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

138 Коммитов

Автор SHA1 Сообщение Дата
Norisz Fay 61cd14ddcd Backed out 6 changesets (bug 1661293) for causing Bug 1758370 CLOSED TREE
Backed out changeset 8f4d646a4bf6 (bug 1661293)
Backed out changeset ec817d9e8a17 (bug 1661293)
Backed out changeset efd35f1d9bd5 (bug 1661293)
Backed out changeset 00d93cc6125f (bug 1661293)
Backed out changeset 77b0b0003ca0 (bug 1661293)
Backed out changeset 04443fa474ac (bug 1661293)
2022-03-23 17:04:22 +02:00
Steve Fink c3b0f38d01 Bug 1661293 - Move idle-time nursery GCs to a new nsJSContext::MaybePokeGC r=jonco,smaug
Differential Revision: https://phabricator.services.mozilla.com/D100367
2022-03-03 04:21:47 +00:00
Jon Coppeard 6488ea1184 Bug 1744059 - Rename UnsafeTraceRoot to TraceRoot as it is not unsafe to use r=sfink,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D132969
2021-12-07 09:02:36 +00:00
Florian Quèze c76671a979 Bug 1727137 - Require IdleRunnable instances to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123357
2021-08-31 13:41:45 +00:00
Sandor Molnar c235ffd64c Backed out 3 changesets (bug 1727137, bug 1727517, bug 1727756) for causing build bustages. CLOSED TREE
Backed out changeset 8796b374824b (bug 1727756)
Backed out changeset 49d136788ebd (bug 1727517)
Backed out changeset 092525a3d26a (bug 1727137)
2021-08-30 19:39:16 +03:00
Florian Quèze 48ad00f6e2 Bug 1727137 - Require IdleRunnable instances to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123357
2021-08-30 16:09:49 +00:00
Olli Pettay 5beba99004 Bug 1724777, optimize suppressed MicroTask handling, r=mccr8
The test is in theory racy, but trying to limit the cases when it might behave badly
by running it on opt desktop builds only. Without the patch the 'period' check takes over 400ms locally and with the
patch 1-3ms.

The changes are just trying to optimize execution, not change the behavior.
Use of SuppressedMicroTasks is perhaps a bit odd, but it helps keeping
SavedMicroTaskQueue and similar code simple.

Differential Revision: https://phabricator.services.mozilla.com/D122290
2021-08-12 16:01:08 +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
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
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
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
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
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
Razvan Maries 6767314b95 Backed out 4 changesets (bug 1648453) for hazzard bustages on CycleCollectedJSContext.cpp. CLOSED TREE
Backed out changeset 9598a75cca47 (bug 1648453)
Backed out changeset 473e7d55a25e (bug 1648453)
Backed out changeset 0afcee198ecd (bug 1648453)
Backed out changeset 623252539387 (bug 1648453)
2020-07-17 00:01:11 +03:00
Jon Coppeard 17558447d2 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-16 12:54:55 +00:00
Mihai Alexandru Michis 30e2927e24 Backed out 3 changesets (bug 1648453) for causing bustages in AccessCheck.h
CLOSED TREE

Backed out changeset 8b21977bb2df (bug 1648453)
Backed out changeset 4cac71f274b8 (bug 1648453)
Backed out changeset a9ad01b4ab2e (bug 1648453)
2020-07-16 15:43:52 +03:00
Jon Coppeard b42f8c7c97 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-16 11:45:42 +00:00
Simon Giesecke 1cd5c68592 Bug 1652002 - Remove some unnecessary includes from BindingUtils.h. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D83098
2020-07-15 15:34:49 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Honza Bambas 8ef571ccca Bug 1638925 - Log promise microtasks dispatch-and-run, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79618
2020-06-24 13:49:09 +00:00
Brindusan Cristian 35fe5d64b2 Backed out 4 changesets (bug 1638925) for build bustages at ipc_channel_posix.cc. CLOSED TREE
Backed out changeset e0fe5351fdf7 (bug 1638925)
Backed out changeset 2c8b67413cd6 (bug 1638925)
Backed out changeset 4ea2c9ceb540 (bug 1638925)
Backed out changeset 84236f1b9064 (bug 1638925)
2020-06-17 20:28:41 +03:00
Honza Bambas 828868b839 Bug 1638925 - Log promise microtasks dispatch-and-run, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79618
2020-06-17 16:13:51 +00:00
Simon Giesecke ebbc7ae838 Bug 1642989 - Use RemoveLastElements instead of RemoveElementsAt where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78049
2020-06-08 08:50:15 +00:00
Jon Coppeard 4452987eb3 Bug 1633468 - Make dom/bindings/Codegen.py compare against JSID_VOID to detect uninitialized jsid members r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D72701
2020-04-28 18:12:12 +00:00
Andreas Farre 25ca8d7890 Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Simon Giesecke 5621715961 Bug 1622114 - Improve array manipulation in CleanupIDBTransactions. r=dom-workers-and-storage-reviewers,smaug,asuth
- Do not remove elements one-by-one but use remove-erase pattern.
- Move mPendingIDBTransactions array instead of copying.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 12:55:12 +00:00
André Bargull 0105311d41 Bug 1618258 - Part 1: Rename FinalizationGroup to FinalizationRegistry. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D66930

--HG--
rename : js/src/builtin/FinalizationGroupObject.cpp => js/src/builtin/FinalizationRegistryObject.cpp
rename : js/src/builtin/FinalizationGroupObject.h => js/src/builtin/FinalizationRegistryObject.h
rename : js/src/gc/FinalizationGroup.cpp => js/src/gc/FinalizationRegistry.cpp
extra : moz-landing-system : lando
2020-03-16 10:41:08 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Simon Giesecke 30984f7bab Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62543

--HG--
extra : moz-landing-system : lando
2020-02-12 11:13:33 +00:00
Sylvestre Ledru 187e9bafaf Bug 1519636 - Automatically reformat recent changes using clang-format r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-21 09:51:27 +00:00
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Yoshi Cheng-Hao Huang e1ea5b98a5 Bug 1609636 - Part 1: Add ClearKeptObjects API. r=jonco,smaug
From WeakRef proposal, [1], ECMAScript implementations are expected to call
ClearKeptObjects when a synchronous sequence of ECMAScript execution completes.

[1]: https://tc39.es/proposal-weakrefs/#sec-clear-kept-objects

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

--HG--
extra : moz-landing-system : lando
2020-01-20 12:49:11 +00:00
Jon Coppeard 5af1cef3ff Bug 1596756 - Support FinalizationGroup objects in the browser r=mccr8
Add browser support for FinalizationGroup by setting the HostCleanupFinalizationGroupCallback in CycleCollectedJSContext.  The callback adds groups pending cleanup to a vector stored in a PersistentRooted.  A runnable is dispatched to call back into the JS engine and perform cleanup at a later time as a separate task.  Using AutoEntryScript reports errors to the console.

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

--HG--
extra : moz-landing-system : lando
2020-01-15 14:22:04 +00:00
Daniel Varga 0dad0cf998 Backed out 4 changesets (bug 1596756, bug 1593698, bug 1608069) for causing mochitest leakchecks.
CLOSED TREE

Backed out changeset 37d24b36ce31 (bug 1596756)
Backed out changeset dbd7b3de1ce6 (bug 1596756)
Backed out changeset 2079d95da4a2 (bug 1593698)
Backed out changeset 49da2705c358 (bug 1608069)
2020-01-10 21:21:19 +02:00
Jon Coppeard 18a075eec7 Bug 1596756 - Support FinalizationGroup objects in the browser r=mccr8
Add browser support for FinalizationGroup by setting the HostCleanupFinalizationGroupCallback in CycleCollectedJSContext.  The callback adds groups pending cleanup to a vector stored in a PersistentRooted.  A runnable is dispatched to call back into the JS engine and perform cleanup at a later time as a separate task.  Using AutoEntryScript reports errors to the console.

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

--HG--
extra : moz-landing-system : lando
2020-01-10 17:22:12 +00:00
Logan Smyth 27b20746e4 Bug 1604526 - Ensure that we don't bail out of microtask checkpoints in debugger hooks. r=bhackett
We are getting this exception because we return false here and do not perform
the microtask checkpoint when CycleCollectedJSContext::runJobs executes, but
the contract of runJobs() _requires_ that the microtask queue be empty after
is has completed execution.

CycleCollectedJSContext::RecursionDepth() returns the depth taking the debugger
recursion depth and the thread recursion depth into account, however when
used here, mTargetedMicroTaskRecursionDepth is expects to only be compared
against the thread recursion depth

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

--HG--
extra : moz-landing-system : lando
2020-01-10 03:09:19 +00:00
Olli Pettay 03c717bd41 Bug 1608093 - Remove support for multiple CycleCollectedJSContexts per CycleCollectedJSRuntime, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D59338

--HG--
extra : moz-landing-system : lando
2020-01-09 17:27:10 +00:00
Paul Bone 8b4c7c407f Bug 1584892 - Remove CycleCollectedJSContext::Initialize's nursery size param r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D47873

--HG--
extra : moz-landing-system : lando
2019-12-16 04:14:55 +00:00
Edgar Chen 6e2bd552ea Bug 1578241 - Get rid of dom.promise_rejection_events.enabled; r=mccr8
promise rejection event was enabled by default on 69 (bug 1525554).
We could get rid of this preference.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 18:08:54 +00:00
Jan de Mooij f88317334f Bug 1591923 - Remove some dead code for cooperative contexts from XPConnect, XPCOM and JSAPI. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D50802

--HG--
extra : moz-landing-system : lando
2019-10-28 14:38:03 +00:00
Emilio Cobos Álvarez a9f43b38fb Bug 1585068 - Cleanup rejections even if errors are muted. r=edgar,smaug
Differential Revision: https://phabricator.services.mozilla.com/D49057

--HG--
extra : moz-landing-system : lando
2019-10-15 14:16:16 +00:00
Paul Bone 03339e515d Bug 1530251 - Remove nursery size parameter from GCRuntime::init r=jonco
Callers should use JS_SetGCParameter() instead.

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

--HG--
extra : moz-landing-system : lando
2019-10-03 05:52:54 +00:00
Bogdan Tara f9d30e06a7 Backed out 2 changesets (bug 1530251) for rust failures CLOSED TREE
Backed out changeset e03401a358a6 (bug 1530251)
Backed out changeset 42913778b66a (bug 1530251)
2019-10-02 14:49:23 +03:00
Paul Bone 846d70ee89 Bug 1530251 - Remove nursery size parameter from GCRuntime::init r=jonco
Callers should use JS_SetGCParameter() instead.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 11:23:58 +00:00
Steve Fink 50cb5abc66 Bug 1583684 - Fix some rooting hazards in DOM bindings r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D47020

--HG--
extra : moz-landing-system : lando
2019-09-26 23:50:14 +00:00