Bug 1426779 - Disable precise runnable leakchecking names on release and beta. r=froydnj
authorAndrew McCreight <continuation@gmail.com>
Thu, 04 Jan 2018 12:59:02 -0800
changeset 397795 2db2c61d036c195934fc2bccbc48dc4a53f11223
parent 397794 b30d693096e385b77a8d384c765e90ac11249579
child 397885 e0c5e43e5690e4aab4612aea27a799086f267a3c
push id57548
push useramccreight@mozilla.com
push dateThu, 04 Jan 2018 21:29:40 +0000
treeherderautoland@2db2c61d036c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1426779
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1426779 - Disable precise runnable leakchecking names on release and beta. r=froydnj The NS_IMPL_NAMED_* macros rely on the mName field, which are not defined on beta or release, so don't use them on those branches, so that Firefox will build. MozReview-Commit-ID: 9wEnPqshBJ8
xpcom/threads/nsThreadUtils.cpp
--- a/xpcom/threads/nsThreadUtils.cpp
+++ b/xpcom/threads/nsThreadUtils.cpp
@@ -35,19 +35,26 @@ NS_IMPL_ISUPPORTS(IdlePeriod, nsIIdlePer
 
 NS_IMETHODIMP
 IdlePeriod::GetIdlePeriodHint(TimeStamp* aIdleDeadline)
 {
   *aIdleDeadline = TimeStamp();
   return NS_OK;
 }
 
+// NS_IMPL_NAMED_* relies on the mName field, which is not present on
+// release or beta. Instead, fall back to using "Runnable" for all
+// runnables.
+#ifdef RELEASE_OR_BETA
+NS_IMPL_ISUPPORTS(Runnable, nsIRunnable, nsINamed)
+#else
 NS_IMPL_NAMED_ADDREF(Runnable, mName)
 NS_IMPL_NAMED_RELEASE(Runnable, mName)
 NS_IMPL_QUERY_INTERFACE(Runnable, nsIRunnable, nsINamed)
+#endif
 
 NS_IMETHODIMP
 Runnable::Run()
 {
   // Do nothing
   return NS_OK;
 }