NS_LogCOMPtrAddRef and NS_LogCOMPtrRelease always pass false to
GetSerialNumber, because they pass in everything they get without
regard to whether it is being logged or not, so they don't want to
create a serial number if none exists. This causes the assertions
added in bug 1309051 to be hit. To work around this, I hoist the
assertion into the other callers of this method. Two of them already
had this check, but it was non-fatal.
This also makes the asserts not happen in release builds, as I decided
it doesn't really matter what happens if somebody tries to use it
there.
--HG--
extra : rebase_source : 5e70290492fd442b79b4d40c300a263e322f485b
Rewrite VsyncRefreshDriverTimer::GetTimerRate to always use the cached
value of the vsync rate in VsyncChild to avoid processing events on
the main thread.
Since VsyncChild::GetTimerRate is called in VsyncRefreshDriverTimer's
constructor, that cached value is bound to be set soon. This should
make the period of time we need to guess in
VsyncRefreshDriverTimer::GetTimerRate very short.
MozReview-Commit-ID: 1bnHNXAP8jY
--HG--
extra : rebase_source : 5a731962d417c4b3352970b2adb92b5d31de021c
Giving '0' (literal zero) to nsCOMPtr is now ambiguous, as both
nsCOMPtr(decltype(nullptr)) and nsCOMPtr(T*) could be used.
In any case, our coding standards mandate the use of 'nullptr' for pointers.
So I'm changing all zeroes into nullptr's where necessary.
MozReview-Commit-ID: LXiZTu87Ck6
--HG--
extra : rebase_source : f9dcc6b06e9ebf9c30a576f9319f76a51b6dc26f
Just a mechanical find/replace of all zero pointers, before the next patch.
MozReview-Commit-ID: DSzSZunAXWu
--HG--
extra : rebase_source : a5a9a064335254a7456a7ec48805c4ec08fd18af
This marks the idl classes as deprecated, removes an unnecessary include that
was triggering deprecation warnings and wraps a necessary include in
XPCOMInit.cpp that is used for registering the component in deprecation
disabling pragmas.
MozReview-Commit-ID: BbNU5q8O4Q4
This converts the tests to gtests. Most of them are just runtime tests and just
hava dummy assertion that everything ran. One test remains disabled, although
it's still built-in. You can run the disabled test with the following command:
> GTEST_ALSO_RUN_DISABLED_TESTS=1 ./mach gtest DeadlockDetectorScalability.*
MozReview-Commit-ID: 57rxjiZKjQ6
--HG--
rename : xpcom/tests/TestDeadlockDetectorScalability.cpp => xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
This converts TestDeadlockDetector to a gtest. The logic for spawning off
subprocesses is replaced with gtest's built-in death tests. On linux this will
clone() the process and assert that the child process generates the appropriate
assertion message. On OSX it will use fork(). In theory this should work on
Windows as well buy spawning a new process but this test currently disabled
there.
MozReview-Commit-ID: 9Sl0hHBVGT3
--HG--
rename : xpcom/tests/TestDeadlockDetector.cpp => xpcom/tests/gtest/TestDeadlockDetector.cpp
This keeps the ITEMIDLIST pointers in the "LP" flavour to avoid casting away __unaligned qualifiers. __unaligned is meaningless on non-Itanium platforms but clang-cl nonetheless has trouble with it. (https://llvm.org/bugs/show_bug.cgi?id=30578)