Bug 1372405 - Delete default Runnable ctor so name must be provided (r=froydnj)
☠☠ backed out by 17bfc89021ae ☠ ☠
authorBill McCloskey <billm@mozilla.com>
Mon, 12 Jun 2017 13:39:47 -0700
changeset 413983 328c356c0bcd1c53b4270cd84db5ac7a27d49fea
parent 413982 4f6302a98ae41ff2d57c768996d1edbb0afda73a
child 413984 f4521f4c0fc37ab2dfabb8a9e13afe3f61362edb
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1372405
milestone56.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 1372405 - Delete default Runnable ctor so name must be provided (r=froydnj) MozReview-Commit-ID: 9L4UoBJWzQ3
xpcom/threads/nsThreadUtils.h
--- a/xpcom/threads/nsThreadUtils.h
+++ b/xpcom/threads/nsThreadUtils.h
@@ -419,17 +419,17 @@ enum RunnableKind
 // This class is designed to be subclassed.
 class Runnable : public nsIRunnable, public nsINamed
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
   NS_DECL_NSINAMED
 
-  Runnable() {}
+  Runnable() = delete;
 
 #ifdef RELEASE_OR_BETA
   explicit Runnable(const char* aName) {}
 #else
   explicit Runnable(const char* aName) : mName(aName) {}
 #endif
 
 protected:
@@ -449,17 +449,17 @@ private:
 class CancelableRunnable : public Runnable,
                            public nsICancelableRunnable
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   // nsICancelableRunnable
   virtual nsresult Cancel() override;
 
-  CancelableRunnable() {}
+  CancelableRunnable() = delete;
   explicit CancelableRunnable(const char* aName) : Runnable(aName) {}
 
 protected:
   virtual ~CancelableRunnable() {}
 private:
   CancelableRunnable(const CancelableRunnable&) = delete;
   CancelableRunnable& operator=(const CancelableRunnable&) = delete;
   CancelableRunnable& operator=(const CancelableRunnable&&) = delete;