Use "= delete" for Locker(int)
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jun 2016 19:40:20 +0000 (19:40 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jun 2016 19:40:20 +0000 (19:40 +0000)
Rubber stamped by Saam Barati.
Source/JavaScriptCore:

* runtime/ConcurrentJITLock.h:
(JSC::ConcurrentJITLocker::ConcurrentJITLocker):

Source/WTF:

See discussion: https://bugs.webkit.org/show_bug.cgi?id=158306#c8

* wtf/Locker.h:
(WTF::Locker::Locker):
(WTF::Locker::~Locker):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201611 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ConcurrentJITLock.h
Source/WTF/ChangeLog
Source/WTF/wtf/Locker.h

index b20f11b..637535b 100644 (file)
@@ -1,3 +1,12 @@
+2016-06-02  Filip Pizlo  <fpizlo@apple.com>
+
+        Use "= delete" for Locker(int) 
+
+        Rubber stamped by Saam Barati.
+
+        * runtime/ConcurrentJITLock.h:
+        (JSC::ConcurrentJITLocker::ConcurrentJITLocker):
+
 2016-06-02  Keith Miller  <keith_miller@apple.com>
 
         ObjectPropertyCondition should have a isStillValidAssumingImpurePropertyWatchpoint function
index 91d8909..975ef3c 100644 (file)
@@ -132,14 +132,7 @@ public:
     {
     }
     
-    NO_RETURN_DUE_TO_CRASH ConcurrentJITLocker(int)
-        : ConcurrentJITLockerBase(NoLockingNecessary)
-#if ENABLE(CONCURRENT_JIT) && !defined(NDEBUG)
-        , m_disallowGC(Nullopt)
-#endif
-    {
-        RELEASE_ASSERT_NOT_REACHED();
-    }
+    ConcurrentJITLocker(int) = delete;
 
 #if ENABLE(CONCURRENT_JIT) && !defined(NDEBUG)
 private:
index 4a8bc4e..960b8ac 100644 (file)
@@ -1,5 +1,17 @@
 2016-06-02  Filip Pizlo  <fpizlo@apple.com>
 
+        Use "= delete" for Locker(int) 
+
+        Rubber stamped by Saam Barati.
+        
+        See discussion: https://bugs.webkit.org/show_bug.cgi?id=158306#c8
+
+        * wtf/Locker.h:
+        (WTF::Locker::Locker):
+        (WTF::Locker::~Locker):
+
+2016-06-02  Filip Pizlo  <fpizlo@apple.com>
+
         Make it harder to accidentally pass an integer to a locker.
 
         Rubber stamped by Keith Miller.
index 3af052a..52d42ec 100644 (file)
@@ -48,10 +48,7 @@ public:
     // be accessed concurrently.
     Locker(NoLockingNecessaryTag) : m_lockable(nullptr) { }
     
-    NO_RETURN_DUE_TO_CRASH Locker(int)
-    {
-        RELEASE_ASSERT_NOT_REACHED();
-    }
+    Locker(int) = delete;
 
     ~Locker()
     {