gecko-dev/mozglue/tests
Gerald Squelart 16dbd4f365 Bug 1582992 - Removed unneded BlocksRingBuffer's entry destructor, and ProfilerBuffer's JS::AutoSuppressGCAnalysis - r=gregtatum
`BlocksRingBuffer` had an "entry destructor" to make it a more generic
container, and it was useful during early prototyping of the new profiler
storage (so that we could store owning pointers).
But this entry destructor is stored in an `std::function`, which gets marked as
a potential GC caller by the js rooting hazard analyzer; and as this bug found,
it's not obvious where to place `JS::AutoSuppressGCAnalysis`, because profiler
entries (including stacks) could be added on one thread while GC happens
elsewhere, which triggers the embedded `AutoAssertNoGC` check.

Since we don't actually use the entry destructor facility in the profiler, it's
easier to just get rid of it. As a bonus, it's a small optimization.
Tests that were using an entry destructor now use the `State` instead, to verify
that entries are pushed and cleared as expected.

If needed in the future outside of the profiler, `BlocksRingBuffer` could again
include an entry destructor, but it would have to be through templating, so that
the class used in the profiler wouldn't contain an `std::function`.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 20:50:20 +00:00
..
gtest Bug 1483687: Part 3 - Update DLL blocklist gtests to support the revised blocklist data structures; r=mhowell 2019-07-16 18:02:13 +00:00
interceptor Bug 1580293: Ensure that parameter packs in mozglue/misc are expanded as rvalue references; r=mhowell 2019-09-10 19:55:44 +00:00
moz.build Bug 1558350: Add TestNativeNt to cppunittest.ini; r=mhowell 2019-06-11 00:11:58 +00:00
ShowSSEConfig.cpp
TestBaseProfiler.cpp Bug 1582992 - Removed unneded BlocksRingBuffer's entry destructor, and ProfilerBuffer's JS::AutoSuppressGCAnalysis - r=gregtatum 2019-09-23 20:50:20 +00:00
TestNativeNt.cpp Bug 1542830: Part 1 - Updates to NativeNt.h; r=mhowell 2019-09-23 20:16:51 +00:00
TestPrintf.cpp