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

2357 Коммитов

Автор SHA1 Сообщение Дата
Dorel Luca ab3da7db14 Backed out 4 changesets (bug 1636823) for gtests failures in TestMultiplexInputStream.BlockingVsAsync. CLOSED TREE
Backed out changeset ebb1525ea063 (bug 1636823)
Backed out changeset 25455bb698d8 (bug 1636823)
Backed out changeset 930874501ab3 (bug 1636823)
Backed out changeset 5d46b483c59c (bug 1636823)
2020-06-01 15:55:33 +03:00
Andrea Marchesini ca598e4147 Bug 1636823 - nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 4 - support Seek(END) correctly, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D77100
2020-06-01 12:16:45 +00:00
Andrea Marchesini d712b10ae6 Bug 1636823 - nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 3 - tests, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D76998
2020-06-01 12:16:27 +00:00
Dorel Luca 1413b0ea0d Backed out 4 changesets (bug 1636823) for build bustages in workspace/obj-build/dist/include/gtest/gtest.h. CLOSED TREE
Backed out changeset 52322ad2515e (bug 1636823)
Backed out changeset 2329c5e53493 (bug 1636823)
Backed out changeset a388fd40baeb (bug 1636823)
Backed out changeset 3019a2171aed (bug 1636823)
2020-06-01 14:39:31 +03:00
Andrea Marchesini 8c01ca65b0 Bug 1636823 - nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 3 - tests, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D76998
2020-06-01 10:31:46 +00:00
Sylvestre Ledru 615c83d723 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D76451
2020-05-25 07:42:38 +00:00
Nathan Froyd 1a536ec126 Bug 1639632 - convert xpcom/ to inherit from mozilla::Runnable where possible; r=KrisWright
A little less boilerplate is nice.

Differential Revision: https://phabricator.services.mozilla.com/D76178
2020-05-20 20:37:58 +00:00
Tom Tung 3d101cac5a Bug 1634267 - DOS device paths shouldn't be blocked by IsBlockedUNCPath; r=dom-workers-and-storage-reviewers,janv,froydnj
Bug 1536796 introduces "\\?\" prefix (DOS device specifier) to Windows file
paths. At the moment, the prefix is only prepended to the file paths that start
with a disk designator and a backslash.

On the other hands, IsBlockedUNCPath blocks file paths that start with "\\" in
Windows and that includes DOS device paths (the cases mentioned above).

Thus, this patch prevents DOS device paths from being treating as UNC paths in
IsBlockedUNCPath.

Differential Revision: https://phabricator.services.mozilla.com/D73621
2020-05-13 14:32:35 +00:00
Jean-Yves Avenard ab7618f0d9 Bug 1592488 - P2. Add MozPromise::Private::UseDirectTaskDispatch. r=bholley
If set, the callback will be dispatched via a direct task.
Direct tasks are run via the current thread's tail dispatcher.
This mechanism is only available if both the caller and the target are on the same thread and an AbstractThread is available

Differential Revision: https://phabricator.services.mozilla.com/D71592
2020-05-12 10:42:44 +00:00
Jean-Yves Avenard 68431ed26f Bug 1592488 - P1. Add MozPromise::Private::UseSynchronousTaskDispatch. r=bholley
If set, the callback will be run synchronously when the promise is resolved or rejected.

Differential Revision: https://phabricator.services.mozilla.com/D71591
2020-05-12 10:53:48 +00:00
Bas Schouten e77dae9051 Bug 1635414: Cancel second repeating runnable. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D73857
2020-05-05 20:45:48 +00:00
Valentin Gosu d986351217 Bug 1624090 - Make it possible to forward rust logging into the Gecko logger r=froydnj
This makes it possible to enable rust logging at runtime using about:networking

Differential Revision: https://phabricator.services.mozilla.com/D73146
2020-05-09 11:24:33 +00:00
Ian Moody 011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Simon Giesecke 97d4011b9b Bug 1626570 - Improve handling of copying arrays in MozPromise. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73641
2020-05-05 13:01:43 +00:00
Simon Giesecke 2a7a935311 Bug 1626570 - Improve handling of copying arrays in xpcom/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73624
2020-05-05 11:27:18 +00:00
Simon Giesecke ae6bdc7e8b Bug 1626570 - Add CopyableAutoTArray. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73300
2020-05-05 10:56:14 +00:00
Simon Giesecke acd58ae811 Bug 1628692 - Make FallibleTArray uncopyable. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D71577
2020-04-29 08:42:52 +00:00
Eric Rahm 46564057be Bug 1610067 - Remove nsAutoPtr. r=xpcom-reviewers,nika'
`nsAutoPtr` has been deprecated for 6 years. All remaining references are gone and it can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D72930
2020-04-29 17:28:06 +00:00
Simon Giesecke 74b75d282b Bug 1634023 - Add deduction guides for Span. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D73040
2020-04-29 16:04:56 +00:00
Bogdan Tara 8779e89d94 Backed out changeset eeaa8ec71789 (bug 1610067) for bustages complaining about nsAutoPtr.h CLOSED TREE 2020-04-29 18:57:30 +03:00
Eric Rahm 0e773321c4 Bug 1610067 - Remove nsAutoPtr. r=xpcom-reviewers,nika'
`nsAutoPtr` has been deprecated for 6 years. All remaining references are gone and it can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D72930
2020-04-28 23:45:51 +00:00
Bob Clary fad49b2fa4 Bug 1631671 - Skip test_nsIProcess.js as random on Android. a=fix
CLOSED TREE
2020-04-24 13:07:52 -07:00
Nika Layzell e0f0ac8afa Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-24 18:33:09 +00:00
Simon Giesecke 2d8c4390b7 Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D71300
2020-04-24 13:35:27 +00:00
Simon Giesecke c0341c3791 Bug 1628715 - Part 10: Activate nodiscard attributes on AppendElement(s). r=xpcom-reviewers,nika,peterv
Differential Revision: https://phabricator.services.mozilla.com/D70834
2020-04-24 14:34:15 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Simon Giesecke c80cf74d98 Bug 1628715 - Part 7bis: Add gtests for nsTArray::AppendElements. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D71062
2020-04-24 14:00:48 +00:00
Simon Giesecke 9cc891f41f Bug 1628715 - Part 5: Add MOZ_NONNULL_RETURN to infallible nsTArray::InsertElementsAt. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D70403
2020-04-24 13:26:13 +00:00
Simon Giesecke 15b35a401a Bug 1628715 - Part 1: Add MOZ_NONNULL_RETURN attributes to some nsTArray functions. r=xpcom-reviewers,erahm
Differential Revision: https://phabricator.services.mozilla.com/D70382
2020-04-24 13:47:55 +00:00
Simon Giesecke ff91091933 Bug 1628715 - Part 1bis: Add nodiscard attribute to SwapElements. r=xpcom-reviewers,nika,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70836
2020-04-24 13:24:25 +00:00
Narcis Beleuzu fffdcb0203 Backed out 7 changesets (bug 1580565) for bustages on nsDocShell.cpp . CLOSED TREE
Backed out changeset 8237f9a307f8 (bug 1580565)
Backed out changeset 47f5698d6c72 (bug 1580565)
Backed out changeset e1802670dcc4 (bug 1580565)
Backed out changeset 0a44c410b59b (bug 1580565)
Backed out changeset 20dbcfc9eacc (bug 1580565)
Backed out changeset cdf2b600e779 (bug 1580565)
Backed out changeset a421d33d03ce (bug 1580565)
2020-04-24 05:31:55 +03:00
Nika Layzell 88293ee406 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-23 21:52:51 +00:00
Andreea Pavel b74d860d87 Backed out 7 changesets (bug 1580565) for bc failures on a CLOSED TREE
Backed out changeset e44e0a6366f8 (bug 1580565)
Backed out changeset c0849928f934 (bug 1580565)
Backed out changeset 3d4f155096be (bug 1580565)
Backed out changeset 108d5fb4418e (bug 1580565)
Backed out changeset d8dea951a032 (bug 1580565)
Backed out changeset f9ab41f29552 (bug 1580565)
Backed out changeset fd5d76304c09 (bug 1580565)
2020-04-22 21:51:17 +03:00
Nika Layzell 34024af634 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-22 16:25:18 +00:00
Dorel Luca 7daa9a6695 Backed out 7 changesets (bug 1580565) for Gecko-view failures in Test.crashParent. CLOSED TREE
Backed out changeset 7da9785ebb06 (bug 1580565)
Backed out changeset a80e177a91b2 (bug 1580565)
Backed out changeset 2cf821f2a6ea (bug 1580565)
Backed out changeset a30f158eba45 (bug 1580565)
Backed out changeset 276b131190a8 (bug 1580565)
Backed out changeset 3c15e4c600c4 (bug 1580565)
Backed out changeset bf8877cdb10f (bug 1580565)
2020-04-22 18:42:24 +03:00
Nika Layzell 38bdb3ed64 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-22 03:22:07 +00:00
Bogdan Tara 4bd759fa8e Backed out 7 changesets (bug 1580565) for browser_entry_point_telemetry.js failures CLOSED TREE
Backed out changeset 12a4f3de76a8 (bug 1580565)
Backed out changeset 81d537df2dc1 (bug 1580565)
Backed out changeset b182e872c9d4 (bug 1580565)
Backed out changeset 0b4595b2c153 (bug 1580565)
Backed out changeset 4363e3a3d799 (bug 1580565)
Backed out changeset cbb14b2c7b33 (bug 1580565)
Backed out changeset 46b251848297 (bug 1580565)
2020-04-22 06:15:43 +03:00
Nika Layzell 5708211961 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-22 01:38:05 +00:00
Nika Layzell 9fdd774725 Bug 1630777 - Relax Span nsTArray methods, r=xpcom-reviewers,sg
Relaxes the type constraints for span overloads on `nsTArray`, such as
`AppendElements`. They previously took `Span<const Item>`, which could cause
build errors when attempting to pass a non const-qualified Item such as in
`Span<RefPtr<BrowsingContext>>`.

Differential Revision: https://phabricator.services.mozilla.com/D71232
2020-04-17 20:17:01 +00:00
Eric Rahm 3442b6f2d5 Bug 1627393 - Add missing includes and namespaces to xpcom/tests. r=xpcom-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D69659

--HG--
extra : moz-landing-system : lando
2020-04-07 19:10:57 +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
Andreas Farre f2fa2e633c Bug 1620594 - Part 5: Use GetMainThreadSerialEventTarget instead of SystemGroup::EventTargetFor. r=nika
This patch also tries to remove the event target entirely if it would
default to the main thread on a null event target.

Depends on D67634

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:07 +00:00
Simon Giesecke 360c4632f4 Bug 1627198 - Make nsTHashtable a STL-style range. r=froydnj
This makes nsTHashtable usable with range-based for and STL-style algorithms.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 09:18:02 +00:00
Narcis Beleuzu f6ebb84618 Backed out 2 changesets (bug 1626884, bug 1627198) for bustages on ElfLoader.h CLOSED TREE
Backed out changeset b545e60f385c (bug 1627198)
Backed out changeset 16ee5dd004d3 (bug 1626884)

--HG--
extra : histedit_source : 21258c723c796773307977dabbd50de5aba6bd34
2020-04-03 21:56:38 +03:00
Simon Giesecke 017553af0a Bug 1627198 - Make nsTHashtable a STL-style range. r=froydnj
This makes nsTHashtable usable with range-based for and STL-style algorithms.

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

--HG--
extra : moz-landing-system : lando
2020-04-03 14:27:17 +00:00
Simon Giesecke 94fa08db9c Bug 1626267 - Added transformation algorithms with error handling. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68994

--HG--
extra : moz-landing-system : lando
2020-04-01 15:53:58 +00:00
Tom Tung 5a6c32a460 Bug 1536796 - P5 - Changes on xpcom gtest to verify the fix; r=dom-workers-and-storage-reviewers,janv,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60871

--HG--
extra : moz-landing-system : lando
2020-04-01 11:34:31 +00:00
André Bargull 14ca007916 Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.

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

--HG--
extra : moz-landing-system : lando
2020-03-28 16:00:09 +00:00
André Bargull f70fd1c1bd Bug 1625138 - Part 37: Replace mozilla::IsSame with std::is_same in xpcom/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68556

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:21 +00:00
André Bargull 42d4ebbda9 Bug 1625138 - Part 27: Replace mozilla::DeclVal with std::declval. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68545

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:18 +00:00
Chris Peterson b1f54173e8 Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

Also remove MOZ_MUST_USE from nsIMemoryReporter's function pointer typedefs. [[nodiscard]] is an attribute of a function's declaration, not the function's type, and thus can't be applied to function pointers or lambdas.

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

--HG--
extra : moz-landing-system : lando
2020-03-27 17:21:48 +00:00
Simon Giesecke d34d3a8d8a Bug 1620632 - Fix move assignment of AutoTArray from other nsTArray. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D67879

--HG--
extra : moz-landing-system : lando
2020-03-25 13:48:22 +00:00
Simon Giesecke e3a19c9b3e Bug 1620632 - Added tests for moving nsTArray/AutoTArray/FallibleTArray with MoveOnly element type. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D66081

--HG--
extra : moz-landing-system : lando
2020-03-20 17:06:29 +00:00
Simon Giesecke 7e9a7de895 Bug 1620632 - Rename confusingly named types/macros for relocation handling of nsTArray. r=froydnj
Specifically, this renames
* nsTArray_CopyChooser to nsTArray_RelocationStrategy
* the Copy template argument of nsTArray_base to RelocationStrategy
* nsTArray_CopyWithConstructors to nsTArray_RelocateUsingMoveConstructor
* nsTArray_CopyWithMemutils to nsTArray_RelocateUsingMemutils
* DECLARE_USE_COPY_CONSTRUCTORS to MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR

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

--HG--
extra : moz-landing-system : lando
2020-03-20 17:04:27 +00:00
Simon Giesecke 7434f710c9 Bug 1623325 - Fix nsTArrayBackInserter and add moving test. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D67337

--HG--
extra : moz-landing-system : lando
2020-03-18 16:07:12 +00:00
David Major e5cd04c721 Bug 1616943 - Run GTests on Windows ASan builds r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D64210

--HG--
extra : moz-landing-system : lando
2020-02-25 22:43:49 +00:00
Simon Giesecke a57a57b669 Bug 1617898 - Add nsBaseHashtable::RemoveIf function. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64090

--HG--
extra : moz-landing-system : lando
2020-02-25 15:31:07 +00:00
Simon Giesecke 3db3ebfab0 Bug 1617841 - Add nsClassHashtable::Put overloads accepting a UniquePtr rvalue. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64026

--HG--
extra : moz-landing-system : lando
2020-02-25 14:36:59 +00:00
Simon Giesecke 166369d19b Bug 1617542 - Make nsRefPtrHashtable::Put accept a RefPtr rvalue. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63838

--HG--
extra : moz-landing-system : lando
2020-02-24 17:53:41 +00:00
Cosmin Sabou 7f1afff492 Backed out 5 changesets (bug 1617604, bug 1617542, bug 1617546) for causing build bustages on ipc/mscom/Interceptor.cpp.
CLOSED TREE

Backed out changeset 5faa54ad950e (bug 1617542)
Backed out changeset cb38779e1eb6 (bug 1617604)
Backed out changeset 3aea18e0396f (bug 1617542)
Backed out changeset bc3eeefdfb6c (bug 1617542)
Backed out changeset b76a3aa5ff6f (bug 1617546)
2020-02-24 19:50:13 +02:00
Simon Giesecke 51d21f99d6 Bug 1617542 - Make nsRefPtrHashtable::Put accept a RefPtr rvalue. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63838

--HG--
extra : moz-landing-system : lando
2020-02-24 16:15:48 +00:00
Sylvestre Ledru ca6530131a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan,kvark
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-02-24 15:33:38 +00:00
Kartikaya Gupta 50e5dda0da Bug 1617213 - Allow dot characters in log module names. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D63693

--HG--
extra : moz-landing-system : lando
2020-02-21 17:37:42 +00:00
Mike Shal c8abdd68c2 Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D63438

--HG--
extra : moz-landing-system : lando
2020-02-21 00:05:17 +00:00
Csoregi Natalia 6360b24e80 Backed out 2 changesets (bug 1616630) for Android bustage. CLOSED TREE
Backed out changeset 15016546c954 (bug 1616630)
Backed out changeset dcb7dc51633b (bug 1616630)
2020-02-20 21:24:11 +02:00
Mike Shal 39492660f4 Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
Depends on D63437

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

--HG--
extra : moz-landing-system : lando
2020-02-20 16:21:55 +00:00
Mike Shal d8e4653d19 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 13:22:46 +00:00
Olli Pettay 62617da1ea Bug 1615607 - Consider to always treat high priority runnables as the highest priority runnables, r=farre
The patch removes the tad odd interleave behavior from the main thread and makes RefreshDriver to give
at least a tiny bit time for non-high priority tasks.
Given the recent change to have similar block-until behavior in child and parent process, this should work
consistently in all the processes.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 16:03:37 +00:00
Cosmin Sabou ff39f9206d Backed out 2 changesets (bug 1613263, bug 1611326) for presummably causing l10n langpack bustages. a=backout
Backed out changeset 77e54e76848a (bug 1611326)
Backed out changeset 36ba18ac3a68 (bug 1613263)
2020-02-14 15:02:21 +02:00
Mike Shal ad0c283ab2 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 23:07:04 +00:00
Brindusan Cristian e2fb6b8344 Backed out changeset 7fefed11f117 (bug 1611326) for build bustages at update-1.xpi.stub. CLOSED TREE 2020-02-13 23:33:34 +02:00
Mike Shal e6464dd404 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 20:31:50 +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
Kristen Wright cc862d2d30 Bug 1539944 - Get rid of NS_NewThread r=froydnj
Gets rid of `NS_NewThread`. Where it was used in testing, I gave the new named threads names relevant to their tests.

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

--HG--
extra : source : 541b98270c9985c5bd3569ff3ff8bc6c3d3c650a
2020-02-11 21:01:56 +00:00
Ciure Andrei 0ddf5384e0 Backed out changeset 541b98270c99 (bug 1539944) for causing bc leaks CLOSED TREE 2020-02-12 03:23:15 +02:00
Kristen Wright e40c296db4 Bug 1539944 - Get rid of NS_NewThread r=froydnj
Gets rid of `NS_NewThread`. Where it was used in testing, I gave the new named threads names relevant to their tests.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 21:01:56 +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
Emilio Cobos Álvarez 71e16d9992 Bug 1610066 - Make nsTArray::SafeElementAt not require the complete type for smart pointers. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60338

--HG--
extra : moz-landing-system : lando
2020-01-20 16:21:59 +00:00
Boris Zbarsky 456fe70ba3 Bug 1565804. Adjust ThreadMetrics tests to not go orange if they lose timeslice during sleep. r=tarek
In particular, we don't want to assume that when we sleep for N ms that will
actually take about Nms of time.  Instead, record how much time it took, and
make sure that our thread metric accounting accounts for all that time, but not
any of the extra time it shouldn't account for.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 22:32:08 +00:00
Boris Zbarsky e42c854c27 Bug 1607953. Refactor our runnable metrics and long task code to make it more robust and correct. r=jesup,tarek,froydnj
The idea is to use the slice-accounting setup from the performance counters for
idle tasks as well, and fix the various bugs we have when nested event loops
are involved.

The bit in nsThread::SizeOfEventQueues that counted memory for
mCurrentPerformanceCounter was wrong all along, I think: the docgroup that owns
the performance counter should account for it.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 22:31:05 +00:00
Emilio Cobos Álvarez baa5b9f495 Bug 1608729 - TestThreadUtils isn't counting copies correctly. r=froydnj
The increments are incrementing the pointers, not the values.

This was caught by a GCC warning.

Depends on D59646

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

--HG--
extra : moz-landing-system : lando
2020-01-13 14:15:17 +00:00
Eric Rahm 5ff63a5642 Bug 1606187 - Part 2a: Switch nsClassHashtable over to UniquePtr r=KrisWright,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59041

--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:43 +00:00
Eric Rahm 6d75492859 Bug 1241518 - Part 1: Remove unused nsAutoPtr.h includes in xpcom/ r=kmag
This removes various unused `#include "nsAutoPtr.h"` in `xpcom/`. Additionally
adds a few includes to the media stack.

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

--HG--
extra : moz-landing-system : lando
2020-01-07 00:06:01 +00:00
Nathan Froyd 55a8bbf010 Bug 1605417 - use GeneratedFile template in xpcom/tests/gtest/; r=KrisWright
The template is slightly nicer and slighty more modern.

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

--HG--
extra : moz-landing-system : lando
2019-12-27 18:38:13 +00:00
emalysz 8d905323d8 Bug 1579581, Part 1: Remove remaining CPU info off main-thread and load later on startup. r=mconley,chutten
Differential Revision: https://phabricator.services.mozilla.com/D51704

--HG--
extra : moz-landing-system : lando
2019-12-31 16:28:18 +00:00
Simon Giesecke 4170b9c2da Bug 1605119 - Add NS_NewCancelableRunnableFunction. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D57799

--HG--
extra : moz-landing-system : lando
2019-12-19 17:13:06 +00:00
Andreas Farre 9dcf7d5237 Bug 1561715 - Part 1: Remove unused functionality in SchedulerGroup. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55638

--HG--
extra : moz-landing-system : lando
2019-12-11 14:48:41 +00:00
Simon Giesecke fec8c64d2a Bug 1602452 - Make member functions of nsTStringRepr defined in header constexpr. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D56369

--HG--
extra : moz-landing-system : lando
2019-12-10 08:40:48 +00:00
Mihai Alexandru Michis f995448544 Backed out changeset bf906a905a26 (bug 1602452) for causing bustages in gtest/TestStrings.cpp
CLOSED TREE
2019-12-09 17:41:25 +02:00
Simon Giesecke 50cf008dd3 Bug 1602452 - Make member functions of nsTStringRepr defined in header constexpr. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D56369

--HG--
extra : moz-landing-system : lando
2019-12-09 15:01:22 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Kershaw Chang f3bddbd52b Bug 1596409 - P1.1: Make socket process support IPCStream r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D54289

--HG--
extra : moz-landing-system : lando
2019-12-03 13:41:58 +00:00
Cosmin Sabou 2952534343 Backed out changeset b3f5d18be1e6 (bug 1579581) for causing valgrind bustages. CLOSED TREE 2019-11-27 22:12:02 +02:00
emalysz 563fdba9f3 Bug 1579581, Part 1: Remove remaining CPU info off main-thread and load later on startup. r=mconley,chutten
Differential Revision: https://phabricator.services.mozilla.com/D51704

--HG--
extra : moz-landing-system : lando
2019-11-27 16:14:43 +00:00
Dorel Luca 6e67f20e69 Backed out changeset c7be5c184756 (bug 1579581) for reftest failures in xpcom/base/nsSystemInfo.cpp. CLOSED TREE 2019-11-26 22:35:40 +02:00
emalysz 5c76883c08 Bug 1579581, Part 1: Remove remaining CPU info off main-thread and load later on startup. r=mconley,chutten
Differential Revision: https://phabricator.services.mozilla.com/D51704

--HG--
extra : moz-landing-system : lando
2019-11-26 18:09:05 +00:00
Simon Giesecke 28f1dd4c5b Bug 1595750 - Add MakeBackInserter function to create a back-inserting output iterator for nsTArray. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D52685

--HG--
extra : moz-landing-system : lando
2019-11-13 09:06:42 +00:00
Noemi Erli 985bd5675a Backed out changeset 9b131da7e0cc (bug 1595750) for causing Windows build bustages CLOSED TREE 2019-11-12 20:08:09 +02:00
Simon Giesecke e0f8b73760 Bug 1595750 - Add MakeBackInserter function to create a back-inserting output iterator for nsTArray. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D52685

--HG--
extra : moz-landing-system : lando
2019-11-12 15:52:24 +00:00
Sylvestre Ledru f12b9fa5c3 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Geoff Brown dcb380399e Bug 1582785 - Enable some xpcshell tests on Android; r=geckoview-reviewers,agi
Most of these tests have been disabled for a long time; they run well
in the current test environment.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 22:43:55 +00:00
Nathan Froyd ad2dc55c0b Bug 1581941 - ignore the return values of some STL functions; r=sg
These functions are marked `nodiscard` in C++17.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 06:34:37 +00:00
Henri Sivonen c193518677 Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D43957

--HG--
extra : moz-landing-system : lando
2019-09-18 08:26:34 +00:00
Tom Ritter be6c896158 Bug 1575974 - Report any non-zero exit code as a process failure in nsIProcess r=gsvelto
EXIT_FAILURE is 'implementation defined' but can be defined to be 1.
In our case, pingsender exits with EXIT_FAILURE but nsIProcess wasn't
reporting it as failure because it thought failures were always negative.

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

--HG--
extra : moz-landing-system : lando
2019-09-11 04:40:11 +00:00
Razvan Maries 6984e0ca98 Backed out 1 changesets (bug 1575974) for xpcshell perma fails on test_nsIProcess.js. CLOSED TREE
Backed out changeset 44164f4b9d6d (bug 1575974)
2019-09-11 00:17:34 +03:00
Tom Ritter c1e0ceb8cd Bug 1575974 - Correct the expected topic for positive non-zero return values r=me
CLOSED TREE

--HG--
extra : amend_source : b8385ec54d45e4e62c250fcd6fc013764817ad89
extra : histedit_source : d85d2a9f149d002c4790c8c954541a73117180b1
2019-09-10 22:35:46 +03:00
Simon Giesecke 26a1799ab0 Bug 1575479 - Add support for STL iterators and range-based for to nsBaseHashtable. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D44982

--HG--
extra : moz-landing-system : lando
2019-09-10 12:08:02 +00:00
Coroiu Cristina 77681b7832 Backed out 2 changesets (bug 1575479) for build bustage at build/src/gfx/thebes/gfxFT2Fonts.h on a CLOSED TREE
Backed out changeset dcbc7c69fb64 (bug 1575479)
Backed out changeset 6d54a8115393 (bug 1575479)
2019-09-10 15:01:10 +03:00
Simon Giesecke 1b5be2b03f Bug 1575479 - Add support for STL iterators and range-based for to nsBaseHashtable. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D44982

--HG--
extra : moz-landing-system : lando
2019-09-09 14:27:24 +00:00
Simon Giesecke 51a48d706f Bug 1578647 - Add RemoveElementAt/RemoveElementsAt overloads accepting const_iterator. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D44674

--HG--
extra : moz-landing-system : lando
2019-09-04 16:39:29 +00:00
Simon Giesecke 2ac5a4231e Bug 1578649 - Make ArrayIterator<Element&, ArrayType> convertible to ArrayIterator<const Element&, ArrayType>. r=froydnj
This matches the requirement imposed by the Container concept that its iterator type
should be convertible to its const_iterator type.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 18:48:05 +00:00
Tom Ritter d922064696 Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D39961

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:32 +00:00
Sylvestre Ledru 36129ce948 Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in various dirs r=glandium
Depends on D43784

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

--HG--
extra : moz-landing-system : lando
2019-08-30 09:11:19 +00:00
Hiroyuki Ikezoe 2eec537348 Bug 1573648 - Introduce ToDoubleAllowTrailingChars and ToFloatAllowTrailingChars. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D42239

--HG--
extra : moz-landing-system : lando
2019-08-16 22:38:01 +00:00
Nathan Froyd f21661fdf8 Bug 1571759 - add nsTArray::EmplaceBack; r=erahm
Much preferred to `AppendElement(T(...))`.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 00:18:57 +00:00
Nathan Froyd db237d1092 Bug 1298602 - split condition in TestExpirationTracker; r=KrisWright
This condition is intermittently failing, but it's hard to tell from the
failure which part of the condition is failing.  Split the condition
apart so ideally we'll get some better error messages.  While we're
doing that, use a more explicit `EXPECT_LT` for the first half of the
condition for even better error messages.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 18:16:35 +00:00
Boris Zbarsky 0f70d08ec8 Bug 1566595. Stop using [array] in nsIBinaryOutputStream. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D38387

--HG--
extra : moz-landing-system : lando
2019-07-22 20:27:39 +00:00
Ciure Andrei 98278afa46 Backed out changeset a858e4411532 (bug 1566595) for causing Windows MinGW builds bustages CLOSED TREE 2019-07-22 21:39:08 +03:00
Boris Zbarsky 9c74919340 Bug 1566595. Stop using [array] in nsIBinaryOutputStream. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D38387

--HG--
extra : moz-landing-system : lando
2019-07-22 14:52:04 +00:00
Kristen Wright 5984a7cba7 Bug 1565769 - Give threads an additional 50 ms to finish up in ShutdownWithTimeout tests r=erahm
Gtest jobs on the osx1014 try hardware are taking longer than anticipated to finish up, and ThreadPool.ShutdownWithTimeout tests need to wait an extra 50ms to let all threads finish on time. On the long term, when the underlying issue is fixed thread timeouts will need to be readjusted back to 300ms.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 17:57:43 +00:00
Barret Rennie 9d33bd810d Bug 1289211 - Rename InfallibleTArray to nsTArray in xpcom/ r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D36970

--HG--
extra : moz-landing-system : lando
2019-07-10 03:33:59 +00:00
Victor Porof 1fcaa7d445 Bug 1561435 - Format xpcom/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : c64ace0e98b196a9a392d54800159e327921bf99
2019-07-05 11:19:37 +02:00
Nathan Froyd d613ab5af6 Bug 1561410 - modify TestThreadPool to be more robust with bad timekeeping; r=KrisWright
Giving each logical test its own counter variable will help tests to not
interfere with each other.  We also make one infinite looping thread
exit so we're not chewing CPU after these tests finish.

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

--HG--
extra : moz-landing-system : lando
2019-07-02 16:47:27 +00:00
Kristen Wright a77062c3e5 Bug 1544452 - Increase slack boundaries for ExpirationTracker gtest r=froydnj
Increased slack boundaries to account for issues with timer bounds in macos 1014. Lower bound slack = 60ms and upper bound slack = 1200ms. The intent is to get gtests working in the short term while timer delays are fixed, then roll the slack boundary back to 30ms.

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

--HG--
extra : moz-landing-system : lando
2019-07-01 18:08:25 +00:00
Tarek Ziadé f9d319bac0 Bug 1558882 - Fixed intermittent on ThreadMetrics.CollectMetrics r=erahm
The first test does not really need to check that we spend less than
200ms, and we can give more time to the scheduler in the second
test, as long as we check that is less than the recursive dispatched
event

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

--HG--
extra : moz-landing-system : lando
2019-06-14 16:43:01 +00:00
Andrea Marchesini bb718d74fc Bug 1490044 - Remove DOMPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33510

--HG--
extra : moz-landing-system : lando
2019-06-13 09:02:03 +00:00
Dave Townsend 8f1c76b053 Bug 1556829: Convert version numbers larger or smaller than the 32-bit limit to 0. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D33700

--HG--
extra : rebase_source : 1fd6a7b05bb69a9dec655ffb3e668ae1bf13ee8f
2019-06-04 13:23:04 -07:00
Nicklas Boman 779fb0d72a Bug 1122740 - remove useless null checks after allocating memory with |new| r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D33445

--HG--
extra : moz-landing-system : lando
2019-06-04 04:43:11 +00:00
Andrew McCreight 20b03783b4 Bug 1550770 - Error instead of implicitly converting XPCOM interfaces to builtinclass. r=nika
XPIDL has the requirement that [scriptable] interfaces with [notxpcom]
methods or attributes are [builtinclass]. Currently, if you don't
explicitly mark something builtinclass when it should be, then the
XPIDL compiler will just silently treat it like builtinclass. This
means that you can cause the JS implementation of an XPCOM to start
failing without any warning by marking a method notxpcom.

This patch instead makes it an error. A prior patch fixed the existing
instances in the tree that relied on the implicit behavior.

I also added a test that we reject such classes missing builtinclass
at compile time, as well as classes that inherit from builtinclass
interfaces without themselves being builtinclass. I left behind a part
of the runtime test for this behavior, but now this test just ensures
that you can't implement a [builtinclass] interface in JS.

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

--HG--
extra : moz-landing-system : lando
2019-05-14 17:39:14 +00:00
Olli Pettay bf41b4d6d7 Bug 1551203, Bug 1551203 - Give ThrottledEventQueues names, r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D30920

--HG--
extra : moz-landing-system : lando
2019-05-13 18:12:24 +00:00
Jean-Yves Avenard e0f0e16680 Bug 1548795 - P2. Remove dom.performance.enable_scheduler_timing preference. r=tarek
Differential Revision: https://phabricator.services.mozilla.com/D30467

--HG--
extra : moz-landing-system : lando
2019-05-09 23:12:12 +00:00
Geoff Brown 64c5e023b3 Bug 1545217 - Skip gtest TestThreads.cpp on android again; r=jmaher
I enabled this test yesterday, but it turns out it still crashes intermittently:
https://treeherder.mozilla.org/logviewer.html#?job_id=245063009&repo=autoland
https://taskcluster-artifacts.net/DJEiHJaJRaCYMWk2UMoR8A/0/public/test_info//logcat-emulator-5554.log
05-07 08:47:38.460  2530  2545 I gtest   : TEST-START | Threads.Main
--------- beginning of crash
05-07 08:47:38.570  2530  2545 F libc    : stack corruption detected
05-07 08:47:38.570  2530  2545 W google-breakpad: ExceptionHandler::GenerateDump cloned child

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

--HG--
extra : moz-landing-system : lando
2019-05-07 14:20:58 +00:00
Geoff Brown f208694292 Bug 1545217 - Enable some android gtests in xpcom/tests/gtest; r=jmaher
With changes from bug 1548555, some of the gtests previously disabled on Android
can be re-enabled.

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

--HG--
extra : moz-landing-system : lando
2019-05-06 18:53:55 +00:00
Nathan Froyd a3df20e771 Bug 1461601 - lower the OOM bound for TArray::test_fallible on Windows; r=erahm
Apparently 7 is not low enough.  Maybe 6 will be.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 17:04:40 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Edwin Gao 9994405ece Bug 1544961 - comment on gtests that are disabled, disable ThreadUtils.IdleRunnableMethod and Timers.FindExpirationTime for windows10-aarch64 r=jmaher,gbrown,dmajor
Changes:
- added comments for tests being disabled
- disabled two additional tests in order to green the run

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

--HG--
extra : moz-landing-system : lando
2019-04-23 00:21:37 +00:00
Andrew McCreight 19c1077e83 Bug 1545851, part 1 - Change test_process_directives.js to use nsIProperty. r=froydnj
This will let us make nsISupportsString builtinclass.

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

--HG--
extra : moz-landing-system : lando
2019-04-22 14:34:55 +00:00
Andrew McCreight 3b1ec85b01 Bug 1545819 - nsI-ify some XPCOM test interfaces in NotXPCOMTest.idl. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D28237

--HG--
extra : moz-landing-system : lando
2019-04-19 19:19:27 +00:00
Rob Wu 4a6f84f91d Bug 1544834 - Replace deprecated generics in test code r=evilpie
- `Array.map` becomes `Array.from`
- Array copying via `Array.slice` becomes `Array.from`.
- `Array.forEach` that did not rely on closures becomes `for`-`of` loops.
- Anything else: `Array.X` becomes `Array.prototype.X`.

Complex cases:

dom/bindings/test/TestInterfaceJS.js and
dom/bindings/test/test_exception_options_from_jsimplemented.html
use `Array.indexOf` to generate an error with a specific error message.
Switched to `Array.prototype.forEach` to generate the same error.

js/src/jit-test/tests/basic/exception-column-number.js
In this test `Array.indexOf()` is used to generate an error. Since the
exact message doesn't matter, I switched to `Array.from()`.

Intentionally not changed:

editor/libeditor/tests/browserscope/lib/richtext/richtext/js/range.js
Did not modify because this is 3rd-party code and the code uses
feature detection as a fall back when Array generics are not used.

testing/talos/talos/tests/dromaeo/lib/mootools.js
Did not modify because mootools adds the `Array.slice` method to the
`Array` object.

Not changed because they check the implementation of Array generics:
js/src/jit-test/tests/basic/arrayNatives.js
js/src/jit-test/tests/basic/bug563243.js
js/src/jit-test/tests/basic/bug618853.js
js/src/jit-test/tests/basic/bug830967.js
js/src/jit-test/tests/jaeger/recompile/bug656753.js
js/src/jit-test/tests/self-hosting/alternate-static-and-instance-array-extras.js
js/src/tests/non262/Array/generics.js
js/src/tests/non262/Array/regress-415540.js
js/src/tests/non262/extensions/regress-355497.js
js/src/tests/non262/extensions/typedarray-set-neutering.js

Depends on D27802

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

--HG--
extra : moz-landing-system : lando
2019-04-17 19:03:19 +00:00
Ian Moody ac18aebd72 Bug 1544286 - xpcom/ manual ESLint no-throw-literal fixes. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D27451

--HG--
extra : moz-landing-system : lando
2019-04-16 15:02:10 +00:00
Geoff Brown 6668415460 Bug 1284693 - Disable gtest TestPipes on Android; r=jmaher
I missed this intermittent when enabling Android gtests in bug 1318091. Disable
the failing test on Android only, to green up Android gtest.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 17:13:45 +00:00
Henri Sivonen a07d039783 Bug 1543693 - Add missing nsReadableUtils wrappers for conversions between UTF-8 and Latin1 XPCOM string. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D27234

--HG--
extra : moz-landing-system : lando
2019-04-12 17:49:11 +00:00
Geoff Brown 8d88b9a596 Bug 1318091 - Disable failing android gtests; r=bc
Disable gtests observed to fail on Android. Some of these are simple build
failures and failures due to file permissions or paths, while other failures
are more obscure.
Once Android gtests are running on mozilla-central, I will file follow-up
bugs inviting teams to investigate the failures and re-enable Android gtests
that are important to them.

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

--HG--
extra : moz-landing-system : lando
2019-04-08 20:58:21 +00:00
Sylvestre Ledru 03fc65347c Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:42:17 +00:00
Sylvestre Ledru 03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Honza Bambas 1296f23329 Bug 1538812 - Remove the dangerous default 'NS_ASSIGNMENT_DEPEND' of argument 'assignment' on NS_NewByteInputStream to let it be defined expicitly and thus visibly, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D25462

--HG--
extra : moz-landing-system : lando
2019-04-03 11:39:41 +00:00
Philip Chimento 7262bcdffb Bug 1506324 - Use DefaultGlobalClassOps in existing code. r=tcampbell
Reviewers: tcampbell

Subscribers: jandem

Bug #: 1506324

Differential Revision: https://phabricator.services.mozilla.com/D11571
2019-03-31 15:30:45 -07:00
Mark Banner dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Chris Peterson 3f655a7340 Bug 1534878 - xpcom: Rename NS_InitXPCOM2() to NS_InitXPCOM(). r=froydnj
--HG--
extra : rebase_source : 6e7a46cf49f78e46e12d1e7fc76aba6f0c377be0
2019-03-14 23:38:09 -07:00
Chris Peterson d16e0fbd74 Bug 1534878 - xpcom: Re-enable NonASCII16 UTF-16 string tests. r=hsivonen
The NonASCII16 test function was removed in bug 1402247 but the NonASCII16_helper() function was not:

https://hg.mozilla.org/mozilla-central/rev/4ef0f163fdeb

xpcom/tests/gtest/TestUTF.cpp:119:6 [-Wmissing-prototypes] no previous prototype for function 'NonASCII16_helper'

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

--HG--
extra : rebase_source : c53118479acc6ea866dafb04617bfb2706dddb2b
extra : source : de3a70ccef6c09d0d317c7b4b5c1f8a2f93d78c7
2019-02-24 21:45:15 -08:00
Chris Peterson d5e552f528 Bug 1534878 - xpcom: Make some global functions static. r=erahm
clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

xpcom/base/Logging.cpp:85:13 [-Wmissing-prototypes] no previous prototype for function 'ToLogStr'
xpcom/base/Logging.cpp:132:13 [-Wmissing-prototypes] no previous prototype for function 'ExpandPIDMarker'
xpcom/base/LogModulePrefWatcher.cpp:37:6 [-Wmissing-prototypes] no previous prototype for function 'ResetExistingPrefs'
xpcom/base/LogModulePrefWatcher.cpp:109:6 [-Wmissing-prototypes] no previous prototype for function 'LoadExistingPrefs'
xpcom/base/nsCycleCollector.cpp:212:6 [-Wmissing-prototypes] no previous prototype for function 'SuspectUsingNurseryPurpleBuffer'
xpcom/components/nsComponentManager.cpp:421:31 [-Wmissing-prototypes] no previous prototype for function 'begin'
xpcom/components/nsComponentManager.cpp:427:31 [-Wmissing-prototypes] no previous prototype for function 'end'
xpcom/ds/Dafsa.cpp:23:6 [-Wmissing-prototypes] no previous prototype for function 'GetNextOffset'
xpcom/ds/Dafsa.cpp:55:6 [-Wmissing-prototypes] no previous prototype for function 'IsEOL'
xpcom/ds/Dafsa.cpp:62:6 [-Wmissing-prototypes] no previous prototype for function 'IsMatch'
xpcom/ds/Dafsa.cpp:70:6 [-Wmissing-prototypes] no previous prototype for function 'IsEndCharMatch'
xpcom/ds/Dafsa.cpp:78:6 [-Wmissing-prototypes] no previous prototype for function 'GetReturnValue'
xpcom/ds/Dafsa.cpp:91:5 [-Wmissing-prototypes] no previous prototype for function 'LookupString'
xpcom/io/CocoaFileUtils.mm:195:13 [-Wmissing-prototypes] no previous prototype for function 'GetQuarantinePropKey'
xpcom/io/CocoaFileUtils.mm:203:24 [-Wmissing-prototypes] no previous prototype for function 'CreateQuarantineDictionary'
xpcom/rust/gtest/bench-collections/Bench.cpp:65:11 [-Wmissing-prototypes] no previous prototype for function 'MyRand'
xpcom/rust/gtest/bench-collections/Bench.cpp:85:6 [-Wmissing-prototypes] no previous prototype for function 'Bench_Cpp_unordered_set'
xpcom/rust/gtest/bench-collections/Bench.cpp:125:6 [-Wmissing-prototypes] no previous prototype for function 'Bench_Cpp_PLDHashTable'
xpcom/rust/gtest/bench-collections/Bench.cpp:166:6 [-Wmissing-prototypes] no previous prototype for function 'Bench_Cpp_MozHashSet'
xpcom/tests/gtest/TestAtoms.cpp:114:6 [-Wmissing-prototypes] no previous prototype for function 'isStaticAtom'
xpcom/tests/gtest/TestCallTemplates.cpp:72:6 [-Wmissing-prototypes] no previous prototype for function 'JustTestingCompilation'
xpcom/tests/gtest/TestCOMPtr.cpp:87:10 [-Wmissing-prototypes] no previous prototype for function 'CreateIFoo'
xpcom/tests/gtest/TestCOMPtr.cpp:98:6 [-Wmissing-prototypes] no previous prototype for function 'set_a_IFoo'
xpcom/tests/gtest/TestCOMPtr.cpp:105:16 [-Wmissing-prototypes] no previous prototype for function 'return_a_IFoo'
xpcom/tests/gtest/TestCOMPtr.cpp:164:10 [-Wmissing-prototypes] no previous prototype for function 'CreateIBar'
xpcom/tests/gtest/TestCOMPtr.cpp:175:6 [-Wmissing-prototypes] no previous prototype for function 'AnIFooPtrPtrContext'
xpcom/tests/gtest/TestCOMPtr.cpp:177:6 [-Wmissing-prototypes] no previous prototype for function 'AVoidPtrPtrContext'
xpcom/tests/gtest/TestCOMPtr.cpp:179:6 [-Wmissing-prototypes] no previous prototype for function 'AnISupportsPtrPtrContext'
xpcom/tests/gtest/TestCOMPtr.cpp:263:6 [-Wmissing-prototypes] no previous prototype for function 'Comparison'
xpcom/tests/gtest/TestCOMPtr.cpp:298:6 [-Wmissing-prototypes] no previous prototype for function 'DontAddRef'
xpcom/tests/gtest/TestCRT.cpp:17:5 [-Wmissing-prototypes] no previous prototype for function 'sign'
xpcom/tests/gtest/TestDeadlockDetector.cpp:62:6 [-Wmissing-prototypes] no previous prototype for function 'DisableCrashReporter'
xpcom/tests/gtest/TestDeadlockDetector.cpp:74:5 [-Wmissing-prototypes] no previous prototype for function 'Sanity_Child'
xpcom/tests/gtest/TestDeadlockDetector.cpp:95:5 [-Wmissing-prototypes] no previous prototype for function 'Sanity2_Child'
xpcom/tests/gtest/TestDeadlockDetector.cpp:159:5 [-Wmissing-prototypes] no previous prototype for function 'Sanity4_Child'
xpcom/tests/gtest/TestDeadlockDetector.cpp:182:5 [-Wmissing-prototypes] no previous prototype for function 'Sanity5_Child'
xpcom/tests/gtest/TestDeadlockDetector.cpp:303:5 [-Wmissing-prototypes] no previous prototype for function 'ContentionNoDeadlock_Child'
xpcom/tests/gtest/TestHashtables.cpp:88:6 [-Wmissing-prototypes] no previous prototype for function 'testTHashtable'
xpcom/tests/gtest/TestHashtables.cpp:205:10 [-Wmissing-prototypes] no previous prototype for function 'CreateIFoo'
xpcom/tests/gtest/TestMoveString.cpp:25:6 [-Wmissing-prototypes] no previous prototype for function 'SetAsOwned'
xpcom/tests/gtest/TestMoveString.cpp:34:6 [-Wmissing-prototypes] no previous prototype for function 'ExpectTruncated'
xpcom/tests/gtest/TestMoveString.cpp:40:6 [-Wmissing-prototypes] no previous prototype for function 'ExpectNew'
xpcom/tests/gtest/TestMruCache.cpp:52:11 [-Wmissing-prototypes] no previous prototype for function 'MakeStringKey'
xpcom/tests/gtest/TestMultiplexInputStream.cpp:106:34 [-Wmissing-prototypes] no previous prototype for function 'CreateStreamHelper'
xpcom/tests/gtest/TestNonBlockingAsyncInputStream.cpp:62:10 [-Wmissing-prototypes] no previous prototype for function 'ReadSegmentsFunction'
xpcom/tests/gtest/TestNsDeque.cpp:240:6 [-Wmissing-prototypes] no previous prototype for function 'CheckIfQueueEmpty'
xpcom/tests/gtest/TestNsRefPtr.cpp:105:10 [-Wmissing-prototypes] no previous prototype for function 'CreateFoo'
xpcom/tests/gtest/TestNsRefPtr.cpp:116:6 [-Wmissing-prototypes] no previous prototype for function 'set_a_Foo'
xpcom/tests/gtest/TestNsRefPtr.cpp:123:13 [-Wmissing-prototypes] no previous prototype for function 'return_a_Foo'
xpcom/tests/gtest/TestNsRefPtr.cpp:391:6 [-Wmissing-prototypes] no previous prototype for function 'AnFooPtrPtrContext'
xpcom/tests/gtest/TestNsRefPtr.cpp:392:6 [-Wmissing-prototypes] no previous prototype for function 'AVoidPtrPtrContext'
xpcom/tests/gtest/TestPLDHash.cpp:33:6 [-Wmissing-prototypes] no previous prototype for function 'TestCrashyOperation'
xpcom/tests/gtest/TestPipes.cpp:98:10 [-Wmissing-prototypes] no previous prototype for function 'TestPipe'
xpcom/tests/gtest/TestPipes.cpp:212:10 [-Wmissing-prototypes] no previous prototype for function 'TestShortWrites'
xpcom/tests/gtest/TestPipes.cpp:354:6 [-Wmissing-prototypes] no previous prototype for function 'RunTests'
xpcom/tests/gtest/TestPLDHash.cpp:90:6 [-Wmissing-prototypes] no previous prototype for function 'InitCapacityOk_InitialLengthTooBig'
xpcom/tests/gtest/TestPLDHash.cpp:95:6 [-Wmissing-prototypes] no previous prototype for function 'InitCapacityOk_InitialEntryStoreTooBig'
xpcom/tests/gtest/TestPLDHash.cpp:102:6 [-Wmissing-prototypes] no previous prototype for function 'InitCapacityOk_EntrySizeTooBig'
xpcom/tests/gtest/TestSlicedInputStream.cpp:111:20 [-Wmissing-prototypes] no previous prototype for function 'CreateSeekableStreams'
xpcom/tests/gtest/TestSlicedInputStream.cpp:125:20 [-Wmissing-prototypes] no previous prototype for function 'CreateNonSeekableStreams'
xpcom/tests/gtest/TestStrings.cpp:471:6 [-Wmissing-prototypes] no previous prototype for function 'test_assign_helper'
xpcom/tests/gtest/TestTArray.cpp:60:22 [-Wmissing-prototypes] no previous prototype for function 'DummyArray'
xpcom/tests/gtest/TestTArray.cpp:72:22 [-Wmissing-prototypes] no previous prototype for function 'FakeHugeArray'
xpcom/tests/gtest/TestThrottledEventQueue.cpp:96:6 [-Wmissing-prototypes] no previous prototype for function 'Enqueue'
xpcom/threads/BlockingResourceBase.cpp:86:6 [-Wmissing-prototypes] no previous prototype for function 'PrintCycle'
xpcom/threads/CPUUsageWatcher.cpp:41:10 [-Wmissing-prototypes] no previous prototype for function 'GetMicroseconds'
xpcom/threads/CPUUsageWatcher.cpp:46:10 [-Wmissing-prototypes] no previous prototype for function 'GetMicroseconds'
xpcom/threads/CPUUsageWatcher.cpp:51:40 [-Wmissing-prototypes] no previous prototype for function 'GetProcessCPUStats'
xpcom/threads/CPUUsageWatcher.cpp:80:40 [-Wmissing-prototypes] no previous prototype for function 'GetGlobalCPUStats'
xpcom/threads/nsTimerImpl.cpp:196:21 [-Wmissing-prototypes] no previous prototype for function 'GetTimerFiringsLog'

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

--HG--
extra : rebase_source : e03df033209e0a08fc263603e78bc16a09467f15
extra : source : 3beec9fbfdedf346fff85309029e7805717958ac
2019-02-24 17:35:59 -08:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Ryan Hunt f4a515c179 Bug 1523969 part 27 - Move method definition inline comments to new line in 'xpcom/'. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21131

--HG--
extra : rebase_source : 514f36238d908de221a0116f8e8a5d0cf18a168c
extra : histedit_source : 85743d2586a7307738866ce145b93dae2a664cf3
2019-02-25 16:14:01 -06:00
Nika Layzell 305c3ca912 Bug 1522579 - Part 3: Remove consumers of nsIContentChild, r=mccr8
Like Part 2, however for `nsIContentChild`.

Depends on D20550

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

--HG--
extra : moz-landing-system : lando
2019-02-25 20:04:49 +00:00
Nika Layzell 1e93329f70 Bug 1522579 - Part 2: Remove consumers of nsIContentParent, r=mccr8
This patch tries to move them to `ContentParent` instead.

`ProcessPriorityManagerImpl::ObserveContentParentCreated` could not be moved
due to using `do_QueryInterface` to cast from a `nsISupports` down to the
`ContentParent` object. This could be fixed to remove the interfaces entirely,
but I left that for a follow-up.

Depends on D20549

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

--HG--
extra : moz-landing-system : lando
2019-02-25 20:04:47 +00:00
Alex Gaynor 0e903787da Bug 1415508 - use Span in constructing a byte input stream; r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D20687

--HG--
extra : moz-landing-system : lando
2019-02-25 19:11:20 +00:00
Andreea Pavel cd1b27ad4d Backed out 6 changesets (bug 1522579) for build bustages on a CLOSED TREE
Backed out changeset 3c8320baa230 (bug 1522579)
Backed out changeset 0a288a3d85cd (bug 1522579)
Backed out changeset ecfd27e7d150 (bug 1522579)
Backed out changeset eda40fca0758 (bug 1522579)
Backed out changeset 5c7aafa32a0a (bug 1522579)
Backed out changeset a3c5a2c16411 (bug 1522579)
2019-02-25 18:19:38 +02:00
Nika Layzell da5b73b6a0 Bug 1522579 - Part 3: Remove consumers of nsIContentChild, r=mccr8
Like Part 2, however for `nsIContentChild`.

Depends on D20550

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

--HG--
extra : moz-landing-system : lando
2019-02-25 15:51:19 +00:00
Nika Layzell ae293bbea9 Bug 1522579 - Part 2: Remove consumers of nsIContentParent, r=mccr8
This patch tries to move them to `ContentParent` instead.

`ProcessPriorityManagerImpl::ObserveContentParentCreated` could not be moved
due to using `do_QueryInterface` to cast from a `nsISupports` down to the
`ContentParent` object. This could be fixed to remove the interfaces entirely,
but I left that for a follow-up.

Depends on D20549

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

--HG--
extra : moz-landing-system : lando
2019-02-25 15:51:12 +00:00
Jonathan Kingston 3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

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

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Andrea Marchesini be2551ab2c Bug 1523702 - Max IPC message size for InputStream serialization, r=smaug
The total size of an IPC inputStream message must be less than 1mb. When we
compose the message for the multiplex stream, each sub stream collaborates with
its own size, deciding if it's better to be a pipe stream (IPCRemoteStream) or
a full serialized one.

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

--HG--
extra : moz-landing-system : lando
2019-02-04 22:50:51 +00:00
Myk Melez 25349d2601 Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17526

--HG--
extra : moz-landing-system : lando
2019-01-30 17:26:25 +00:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Andrea Marchesini 0499bad916 Bug 1520150 - Single InputStreams can serialize themselves as IPCRemoteStreams (pipe) - part 1 - Passing IPC managers around, r=smaug
Before this set of patches, the decision of exposing the stream as a pipe was
centralized in IPCStreamUtils, based on the total expectation size of the IPC
message. This triggers issues when multiplex inputStreams contain something
that cannot be sent as a pipe (IPCBlobInputStream, for instance), or something
that it's better to do not set as a pipe (nsFileInputStream), together with
memory streams (nsStringInputStream), which could make the IPC message greater
then what accepted (1mb).

These patches move the "pipe vs non-pipe" choice into the single inputStream
implementation.
2019-01-28 10:48:35 +01:00
Randell Jesup 76bd9e73cc Bug 1522150: Add a DeferredTimers queue ahead of the normal Idle EventQueue r=froyd
* * *
Bug 1522150: Rename NS_IdleDispatch* functions since they take queue identifiers r=froyd
2019-01-26 12:18:05 -05:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Henri Sivonen 49e3dc22ba Bug 1519337 - Adjust bound checks in UTF8CharEnumerator. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D16290

--HG--
extra : moz-landing-system : lando
2019-01-16 17:09:32 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru b2099f351e Bug 1515434 - Only activate the deactivation of -Wc++2a-compat from clang 6 r=botond
Differential Revision: https://phabricator.services.mozilla.com/D15012

--HG--
extra : moz-landing-system : lando
2018-12-19 21:18:46 +00:00
Sylvestre Ledru bd9482e301 Bug 1509926 - Disable the warning -Wc++2a-compat on some files r=dholbert
Fails with clang trunk:
"type of UTF-8 string literal will change from array of const char to array of const char8_t in C++2a"
otherwise

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

--HG--
extra : moz-landing-system : lando
2018-12-17 06:56:45 +00:00
Sylvestre Ledru 6f45c666bc Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:35 +00:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Henri Sivonen ba2dc95baf Bug 1493458 - Disable an intermittently failing part of SetCapacity tests. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13230

--HG--
extra : moz-landing-system : lando
2018-11-28 17:20:33 +00:00
Henri Sivonen 8fcc9dd87c Bug 1493458 - Free string buffer using Truncate() after testing SetCapacity(). r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D12538

--HG--
extra : moz-landing-system : lando
2018-11-21 15:27:04 +00:00
Nika Layzell d2f648498e Bug 1477432 - Part 8: Remove test-only Components.classesById and Components.interfacesById, r=mccr8
These two interfaces are effectively never used, so to avoid needing to support
ClassID2JSValue with the new implementation, I remove them entirely.

Differential Revision: https://phabricator.services.mozilla.com/D2285
2018-11-16 17:27:42 -05:00
Valentin Gosu 84b31379ce Bug 1503725 - Do not deallocate nsThreadShutdownContext when leaking thread. r=erahm
Sometimes when we call ShutdownWithTimeout on a thread pool, the unresponsive
thread that we leak will actually complete before the main thread is done.
In that case, the thread will dereference the thread shutdown context, so
we must intentionally leak it too.

Differential Revision: https://phabricator.services.mozilla.com/D10645
2018-11-02 17:38:37 -04:00
Valentin Gosu 412446f4bc Bug 1500861 - Add shutdownWithTimeout method to nsIThreadPool r=froydnj,erahm
This method is necessary because some threads might be stuck making blocking
calls. This means the thread is not processing any events, and we're unable
to safely terminate it. Our solution here is to leak the stuck threads
instead of waiting for them and potentially causing a shutdown hang.

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:46:00 +00:00
Jim Blandy a78e7a516e Bug 1499534: Add Pause, Resume, and IsPaused methods to ThrottledEventQueue. r=froydnj
Depends on D8913

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

--HG--
extra : moz-landing-system : lando
2018-10-23 06:21:10 +00:00
Jim Blandy 208e7e94c1 Bug 1499534: Add GTests for ThrottledEventQueue. r=froydnj
This was already reviewed and approved in bug 1426467.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 14:47:44 +00:00
Gurzau Raul 8e9ffaaf06 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-20 01:09:52 +03:00
Andrea Marchesini 2ed3dd4f7d Bug 1500370 - MemoryBlobImpl and TestNonBlockingAsyncInputStream must expose nsITellableInterface, r=mayhemer 2018-10-19 15:31:36 +02:00
Mark Banner ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Andrea Marchesini 4ebf5b4364 Bug 1496581 - Split nsISeekableStream in 2 classes: nsISeekableStream and nsITellableStream, f=mayhemer, r=froydnj
In the current code there are 3 main issues:

1. nsFileStream is not really thread-safe. There is nothing to protect the
internal members and we see crashes.

2. nsPipeInputStream doesn't implement ::Seek() method and that caused issues
in devtools when a nsHttpChannel sends POST data using a pipe. In order to fix
this, bug 1494176 added a check in nsHttpChannel: if the stream doesn't
implement ::Seek(), let's clone it. This was an hack around nsPipeInputStream,
and it's bad.

3. When nsHttpChannel sends POST data using a file stream, nsFileStream does
I/O on main-thread because of the issue 2. Plus, ::Seek() is called on the
main-thread causing issue 1.

Note that nsPipeInputStream implements only ::Tell(), of the nsISeekableStream
methods. It doesn't implement ::Seek() and it doesn't implement ::SetEOF().

With this patch I want to fix point 2 and point 3 (and consequentially issue 1
- but we need a separate fix for it - follow up). The patch does:

1. it splits nsISeekableStream in 2 interfaces: nsITellableStream and
nsISeekableStream.
2. nsPipeInputStream implements only nsITellableStream.  Doing this, we don't
need the ::Seek() check for point 2 in nsHttpChannel: a simple QI check is
enough.
3. Because we don't call ::Seek() in nsHttpChannel, nsFileStream doesn't do I/O
on the main-thread, and we don't crash doing so.
2018-10-18 13:35:35 +02:00
Andrew McCreight 2df0136940 Bug 1498404 - Fix some errors in manifests r=froydnj
In FxAccountsComponents.manifest, the previous line registers the
component CID, but only for the main process. This means we hit an
error while parsing the manifest in the child process, because the CID
is not recognized. The fix is simply to not try to use the CID to
register the contract in the child process.

As for the rest of the changes, since bug 1438688, XPT information is
compiled into the Firefox binary, so the interfaces manifest entry is
no longer needed. This patch removes instances of this line from
manifest files. This makes some manifest files empty, so the patch
also removes the now-empty files.

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

--HG--
extra : moz-landing-system : lando
2018-10-16 13:26:23 +00:00
Andrew McCreight 877213ca74 Bug 1493791 - Fix trivial calls to do_QueryInterface in XPCOM unit tests r=froydnj
In TestEventTargetQI.cpp, nsIThreadPool is a subclass of
nsIEventTarget, so we cannot QI from the former to the latter once
trivial QIs are banned. However, we still want to check if a QI to
nsIEventTarget does something, so I added an intermediate cast up to
nsISupports, and then QI from there. I wrapped that all up in a
templated function, because the code is a bit ugly, and used it
everywhere for uniformity, even though it is not always needed.

I fixed TestCOMPtr.cpp in the same way, by casting up to nsISupports.

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

--HG--
extra : moz-landing-system : lando
2018-09-27 18:41:42 +00:00
Andrew McCreight 5a1eb609f9 Bug 1493276 - Statically prevent CallQueryInterface to a base class r=froydnj
If a class A is derived from a class B, then an instance of A can be
converted to an instance of class B via a static cast, so QI is not
needed. QIs are slower than static casts.

TestCallTemplates seems to be testing that CallQueryInterface compiles
even if the first argument's class is only ambiguously castable to
nsISupports, so I changed the second argument to be a class unrelated
to the concrete class.

I also removed some useless null checks on the return value of new.

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

--HG--
extra : moz-landing-system : lando
2018-09-27 14:59:55 +00:00
Henri Sivonen 33a649ee4c Bug 1484938 - Make XPCOM string appends and copying assignments write the terminator after writing content. r=froydnj
MozReview-Commit-ID: DOmAitH5YDh

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

--HG--
extra : moz-landing-system : lando
2018-09-24 14:23:35 +00:00
Kris Maglione 1c20e8cbbb Bug 1486147: Part 2 - Update JS string enumerator callers to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4270

--HG--
extra : rebase_source : 2adadcc8e51a7bce1da02f4bee1333b77bfa9944
extra : histedit_source : 9df920fd186f8c96a5d8b9cbff53ea9529f26ee0
2018-08-24 16:22:40 -07:00
Ehsan Akhgari 5d9d4af0cd Bug 1491574 - Part 2: Remove the XPCOM registration for nsPersistentProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5950
2018-09-18 00:58:52 -04:00
Coroiu Cristina 40028657f0 Backed out 3 changesets (bug 1491574) for build bustage at builds/worker/workspace/build/src/netwerk/base/nsNetUtil.cpp on a CLOSED TREE
Backed out changeset 5390b485f7e4 (bug 1491574)
Backed out changeset 3d11b69de826 (bug 1491574)
Backed out changeset e7e8f3f70f8b (bug 1491574)
2018-09-18 07:10:20 +03:00
Ehsan Akhgari 9b9060a876 Bug 1491574 - Part 2: Remove the XPCOM registration for nsPersistentProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5950
2018-09-17 22:05:34 -04:00
Eric Rahm b9e8fd399e Bug 1491151 - Part 1: Add MruCache. r=smaug,froydnj
This adds a most recently used cache that can be used as a quick lookup table
for frequently used entries.

--HG--
extra : rebase_source : 571c32f75e985e299113f73b959809d208aad5f3
2018-09-10 14:45:55 -07:00
Henri Sivonen 89ca07c012 Bug 1487341 - Make Truncate(), SetLength() and Capacity() more efficient by keeping memcpying to the minimum. r=froydnj
MozReview-Commit-ID: 2LeRrWcN8vF

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

--HG--
extra : moz-landing-system : lando
2018-09-17 09:45:02 +00:00
Ehsan Akhgari 8b5f37d34a Bug 1491558 follow-up: Address mats' review comments 2018-09-17 02:23:06 -04:00
Ehsan Akhgari fa81a39327 Bug 1491558 - Remove the XPCOM registration for nsThreadPool; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5943
2018-09-15 12:13:57 -04:00
Jan de Mooij cbb67627a3 Bug 722345 part 3 - Remove request API. r=luke
Differential Revision: https://phabricator.services.mozilla.com/D4424

--HG--
extra : rebase_source : 1842588c00dbc8fb4294ce5436cdb787190909b4
2018-08-28 09:53:30 +02:00
Henri Sivonen c62a32ebf1 Bug 1487606 - Make AppendLiteral() not undo the effect of SetCapacity(). r=froydnj
MozReview-Commit-ID: I2QSXbQhOUH

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

--HG--
extra : moz-landing-system : lando
2018-08-31 14:57:26 +00:00
Margareta Eliza Balazs 2fe43133db Merge inbound to mozilla-central. a=merge 2018-08-29 12:43:37 +03:00
Gerald Squelart bad49db9b0 Bug 1479996 - Combine nsTArray::IndexOf and element access into lambda-friendly functions - r=froydnj
In many places, nsTArray::IndexOf is followed by accessing that element
(hopefully with `Elements() + index`, which skips unnecessary bounds checks.)
But this pattern introduces operations that could be avoided:
- IndexOf converts the address of the found element into an index,
- The caller must test for a special `NoIndex` value,
- On success, accesses convert that index back into the original address.

This patch introduces new 'ApplyIf...' functions that combine all these
operations in a more efficient ensemble: If the sought element is found, it is
passed by reference to a given callable object (usually a lambda); if not
found, another callable is invoked.
Depending on what they need, the first callable may take one of these parameter
lists: (), (size_t), (maybe-const elem_type&), (size_t, maybe-const elem_type&).
On top of removing the pointer->index->pointer operations in most cases,
invoking callables directly from ApplyIf is safer, as the array is guaranteed to
be untouched at this time.
Also, being templates taking function objects, in most cases the compiler should
be able to inline and optimize the search and its callables' code.

This patch gives example uses in nsTArray::Contains, and in
FrameProperties::GetInternal, SetInternal.
And FrameProperties::Has now calls Contains, which is more efficient because
the former code would compute an index (or NoIndex), and then convert that index
to a bool; whereas the new code directly produces a bool from within the search
algorithm.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 22:04:09 +00:00
Henri Sivonen 876f7ad09f Bug 1482828 - Introduce C++ analogs of Rust's nsA[C]StringBulkWriteHandle. r=froydnj
MozReview-Commit-ID: BZyHd4VzNur

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

--HG--
extra : moz-landing-system : lando
2018-08-28 16:42:26 +00:00
Ciure Andrei 9aabc73223 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-08-29 01:31:20 +03:00
Kris Maglione 53f96aa226 Bug 1486182: Part 2a - Add Services.catMan getter for the category manager. r=mossop
This makes it much easier to update existing consumers of
XPCOMUtils.enumerateCategoryEntries to use the category manager directly.

It also, unfortunately, requires updating existing category manager consumers
to use the Services getter in order to avoid ESLint errors.

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

--HG--
extra : rebase_source : fb9fd9b21db80af472ff6250a2e9a35e8d538147
2018-08-24 22:13:57 -07:00
aceman 77d5a7fd81 Bug 1486311 - convert remaining nsIFile::GetDirectoryEntries() callers to pass in a nsIDirectoryEnumerator. r=kmag 2018-08-26 14:15:00 +03:00
Kris Maglione 3a5c05e76f Bug 1484496: Part 5e - Convert remaining nsISimpleEnumerator users to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3733

--HG--
extra : rebase_source : c0fac176d7b3d840c4dbb14f8d95ccfc7f83a5a8
extra : histedit_source : a92c40117d0808a3ad68c972f622a7a42c9ae8ba
2018-08-18 18:13:14 -07:00
Dave Townsend 204fe23163 Bug 1484844: Make nsINIParser mutable. r=froydnj
In order to implement profile-per-install we need a mutable INI parser in early
startup. The current one is implemented in JavaScript and thus not available.
This makes the current read-only C++ INI parser mutable and removes the
JavaScript implementation.

It turns out that the two different implementations of nsIINIParserFactory and
nsIINIParser behaved slightly differently but only in ways that the single test
cared about so I've adjusted things a little to make it work.

The existing C++ implementation did not do validity checks on arguments, this
adds that making empty sections and values illegal.

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

--HG--
rename : xpcom/tests/unit/test_iniProcessor.js => xpcom/tests/unit/test_iniParser.js
extra : source : 524941c8ed0e048ee51be1bd11082b41428ef490
extra : amend_source : 2de6cef5be97448a41733bedda29d6af34aed27a
2017-10-12 14:20:57 -07:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Nika Layzell 7a9f60fafb Bug 1479484 - Part 1: Add make_dafsa.py to the virtualenv's python path, r=froydnj
Summary:
The plan is to also expose perfecthash.py from this module on the python path.
This also allows us to stop using explicit module loading to load make_dafsa.py.

make_dafsa.py was moved into tools/ to avoid any extra python files from
accidentally ending up on the python path.

Reviewers: froydnj!

Tags: #secure-revision

Bug #: 1479484

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


--HG--
rename : xpcom/ds/make_dafsa.py => xpcom/ds/tools/make_dafsa.py
2018-08-01 17:54:41 -04:00
Nika Layzell 24cf25ae22 Bug 1461450 - Part 2: Add tests for AutoTArray move constructors, r=erahm 2018-07-31 17:52:59 -04:00
Cosmin Sabou e748fd8968 Backed out 15 changesets (bug 1475409, bug 1461450, bug 1474369, bug 1471726) for causing rooting hazards and browser chrome failures. CLOSED TREE
Backed out changeset 7ce27aa3ce68 (bug 1474369)
Backed out changeset a8a4e2414daa (bug 1474369)
Backed out changeset 13c9626970e2 (bug 1474369)
Backed out changeset 9817819b7765 (bug 1475409)
Backed out changeset 39fcebfe6529 (bug 1475409)
Backed out changeset c19ca740d3d1 (bug 1475409)
Backed out changeset b26c90518fca (bug 1474369)
Backed out changeset cbdde0474521 (bug 1474369)
Backed out changeset ccea3049fe0f (bug 1474369)
Backed out changeset e9f6d2544a82 (bug 1474369)
Backed out changeset 99c4d07d4b88 (bug 1474369)
Backed out changeset c721ada8a6d6 (bug 1461450)
Backed out changeset 961379be0f5e (bug 1461450)
Backed out changeset cf2448b2635f (bug 1471726)
Backed out changeset 408961783c95 (bug 1471726)
2018-07-30 20:31:24 +03:00
Nika Layzell 9c66afc10b Bug 1461450 - Part 2: Add tests for AutoTArray move constructors, r=erahm 2018-07-30 11:27:58 -04:00
Calixte Denizet cfaea27109 Bug 1473531 -- Disable gtest storage_DeadlockDetectorTest.storage_Sanity5DeathTest for macosx ccov build.
Summary: GTest is permafailing because of this test (GTest is always running over 1200s).

Reviewers: froydnj

Reviewed By: froydnj

Bug #: 1473531

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

--HG--
extra : rebase_source : 07413c4d7ba4eb6bd1439f292bd489a775dab61b
2018-07-17 21:24:12 +03:00
Emilio Cobos Álvarez 6b1dec4b78 Bug 1473804: Don't lie to AutoTArray::EnsureCapacity. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D1995

MozReview-Commit-ID: 350uWaD49tS
2018-07-17 10:23:47 +02:00
Emilio Cobos Álvarez 09e04b0f0f Bug 1475980: A moved table should be empty. r=froydnj
MozReview-Commit-ID: 7K9wNGhIhaD
2018-07-16 18:06:37 +02:00
Valentin Gosu 5bd326c5f5 Bug 1412081 - Add ability to blacklist file paths on Unix platforms r=mayhemer
--HG--
extra : rebase_source : 6894f5c3df745519e5e9db5b7bf6f004922152d1
2018-06-20 02:52:12 +02:00
Tarek Ziadé 0538cd57e2 Bug 1472668 - Don't reset performance counters when reading their values - r=baku
We're changing the counters behavior since they are not notifications anymore.
In the new behavior they don't get reset when they are retrieved,
so we can have several consumers via the promise.

If the values overflow, we let the wrapping occur (unsigned values).

MozReview-Commit-ID: 1adkszScYo4

--HG--
extra : rebase_source : cd554ad4cfa643b09f75bb07e38b5d35e08cf470
2018-07-10 10:06:41 +02:00
Kris Maglione 94f26a6578 Bug 1457728: Support tri-state comparators in nsTArray. r=erahm
MozReview-Commit-ID: FC9GPsJJ03K

--HG--
extra : source : e2d3d7bb9d1f7150ec3be7f8507977f7378ec541
extra : amend_source : 23fe2a504342c2b548e1f01fc80b662ee16443dd
2018-04-28 15:15:04 -07:00
Andreea Pavel be1d77cb98 Backed out changeset e2d3d7bb9d1f (bug 1457728) for build bustages at build\build\src\xpcom\ds\nsTArray.h(807) on a CLOSED TREE 2018-07-07 22:55:25 +03:00
Kris Maglione cd92626ded Bug 1457728: Support tri-state comparators in nsTArray. r=erahm
MozReview-Commit-ID: FC9GPsJJ03K

--HG--
extra : rebase_source : e2384e8f98b76a55aece2358528e9d9cf0272e80
extra : histedit_source : 6d0d89de11127fafd62dda2b860a50ccbbfb583d
2018-04-28 15:15:04 -07:00
Ciure Andrei f61df5dc45 Backed out 4 changesets (bug 1461450, bug 1471726) for linting failure xpidl.py CLOSED TREE
Backed out changeset 6e8148c1ca7f (bug 1461450)
Backed out changeset 2a02d86bc113 (bug 1461450)
Backed out changeset 1907567a85c5 (bug 1471726)
Backed out changeset c4df8eab6d1c (bug 1471726)
2018-07-07 03:12:10 +03:00
Nika Layzell c1f2b81149 Bug 1461450 - Part 2: Add tests for AutoTArray move constructors, r=erahm 2018-07-06 19:53:07 -04:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Nicholas Nethercote 60b1f563cb Bug 1447951 - Store nsDynamicAtom's chars after the end of the object. r=froydnj
This reduces memory usage because we only need one allocation instead of two
for the dynamic atom and its chars, and because we don't need to store a
refcount and a size. It precludes sharing of chars between dynamic atoms, but
we weren't benefiting much from that anyway.

This reduces per-process memory usage by up to several hundred KiB on my
Linux64 box.

One consequence of this change is that we need to allocate + copy in
DOMString::SetKnownLiveAtom(), which could make some things slower.

--HG--
extra : rebase_source : ba4065ea31e509dd985c003614199f73def0596c
2018-06-22 09:38:42 +10:00
Andreea Pavel f85f162e83 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-06-20 14:31:42 +03:00
Tarek Ziadé a895a7efea Bug 1464571 - fixes DOM Worker performance counters - r=baku,froydnj
Now uses StaticPrefs instead of DOMPrefs, and how we count dispatches for Workers.

MozReview-Commit-ID: DTumwcI5bG

--HG--
extra : rebase_source : 0cf5312e714fb260c01df647b2cd1fcc28ffc415
2018-06-19 16:14:06 +02:00
Valentin Gosu 4cade1b2b5 Bug 1389251 - Add esc_Spaces that may be used to force escaping of spaces r=bz,jdescottes
MozReview-Commit-ID: 4tahH3IOKW

--HG--
extra : rebase_source : 12057b98c87d7d3c57e90888082f540c49c5a9a9
2018-06-18 15:06:25 +02:00
Andi-Bogdan Postelnicu 78304aaf0d Bug 1453795 - XPCOM - Initialize member fields in classes/ structures. r=froydnj
--HG--
extra : rebase_source : c9d9e80b83ad52d8ac9203f491f1c9469a7e9b0c
extra : amend_source : ca502ae98ff21a2e3d1ab2d389310f3a5aded5ed
2018-06-15 14:41:20 +03:00
Dorel Luca ba31c8c2b2 Backed out 3 changesets (bug 1389251) for browser-chrome failure on browser/base/content/test/pageinfo/browser_pageinfo_image_info.js. CLOSED TREE
Backed out changeset a76a3251a9d2 (bug 1389251)
Backed out changeset c6baebf7b34c (bug 1389251)
Backed out changeset 6e89a11ae28e (bug 1389251)
2018-06-15 06:18:04 +03:00
Valentin Gosu 316f7bf9ac Bug 1389251 - Add esc_Spaces that may be used to force escaping of spaces r=bz,jdescottes
MozReview-Commit-ID: 7VgNlkWqrPK

--HG--
extra : rebase_source : c7ea99bc727a82e652871e78c222e8d5d642a52e
2018-06-12 03:05:03 +02:00
Honza Bambas e5398fd8f8 Bug 1413868 - Only run the test on Windows. r=me on a CLOSED TREE 2018-06-07 14:58:34 -04:00
Honza Bambas eef37ac56e Bug 1413868. r=valentin 2018-06-07 13:56:16 -04:00
Miko Mynttinen 4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab 7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen 8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Andrea Marchesini e3efeac3c5 Bug 1460561 - nsMultiplexInputStream should behave correctly when NS_InputStreamIsBuffered() is used - gtests, r=froydnj 2018-05-24 07:52:31 +02:00
Honza Bambas 38ced61e49 Bug 1463786 - Make mozilla::Tokenizer work also with char16_t, r=froydnj 2018-05-31 03:40:00 +03:00
Boris Zbarsky 1d8f39e16f Bug 1455676 part 12. Remove use of nsIDOMNode from xpcom/. r=qdot 2018-05-29 22:58:49 -04:00
Jan de Mooij 1879873837 Bug 1464134 part 1 - Fix various places to use Realm instead of JSCompartment. r=luke 2018-05-27 11:53:11 +02:00
Andrea Marchesini 7dcc1b6880 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 9 - necko and docShell, r=mayhemer, r=smaug 2018-05-23 07:12:36 +02:00
Andrea Marchesini 767ed01fe0 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 7 - nsIMultiplexInputStream exposes nsIInputStreamLength, r=froydnj, r=mayhemer 2018-05-23 07:12:35 +02:00
Andrea Marchesini f0fb8aa183 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 6 - nsMIMEInputStream exposes nsIInputStreamLength, r=mayhmer 2018-05-23 07:12:35 +02:00
Andrea Marchesini cb2d1c2cfe Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 4 - SlicedInputStream exposes nsIInputStreamLength, r=froydnj 2018-05-23 07:12:35 +02:00