Bug 525063 - Backing out js/public/ for violation of committing guidelines. a=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 12 Apr 2018 22:15:26 +0300
changeset 412941 516c4fb1e4b862b78a40c472e4d61dea79d51890
parent 412940 16b880957aa7bdfb5bf66bab90cb9e35d5ebe558
child 412985 6e22c4a726c22a6f515ce5b3bb2dd6c8b9ffd0ae
push id33827
push userarchaeopteryx@coole-files.de
push dateThu, 12 Apr 2018 19:16:05 +0000
treeherdermozilla-central@516c4fb1e4b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs525063
milestone61.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 525063 - Backing out js/public/ for violation of committing guidelines. a=backout
js/public/HashTable.h
js/public/Principals.h
js/public/Proxy.h
js/public/RootingAPI.h
--- a/js/public/HashTable.h
+++ b/js/public/HashTable.h
@@ -965,25 +965,17 @@ class HashTable : private AllocPolicy
           : Ptr(entry, tableArg)
           , keyHash(hn)
 #ifdef JS_DEBUG
           , mutationCount(tableArg.mutationCount)
 #endif
         {}
 
       public:
-        AddPtr()
-          : keyHash(0)
-#ifdef JS_DEBUG
-          , mutationCount
-        {
-        }
-#endif
-        {
-        }
+        AddPtr() : keyHash(0) {}
     };
 
     // A collection of hash table entries. The collection is enumerated by
     // calling |front()| followed by |popFront()| as long as |!empty()|. As
     // with Ptr/AddPtr, Range objects must not be used after any mutating hash
     // table operation unless the |generation()| is tested.
     class Range
     {
@@ -1268,19 +1260,16 @@ class HashTable : private AllocPolicy
       , gen(0)
       , hashShift(sHashBits)
       , table(nullptr)
       , entryCount(0)
       , removedCount(0)
 #ifdef JS_DEBUG
       , mutationCount(0)
       , mEntered(false)
-      , stats
-    {
-    }
 #endif
     {}
 
     MOZ_MUST_USE bool init(uint32_t length)
     {
         MOZ_ASSERT(!initialized());
 
         // Reject all lengths whose initial computed capacity would exceed
--- a/js/public/Principals.h
+++ b/js/public/Principals.h
@@ -25,25 +25,17 @@ struct JSPrincipals {
     /* Don't call "destroy"; use reference counting macros below. */
     mozilla::Atomic<int32_t> refcount;
 
 #ifdef JS_DEBUG
     /* A helper to facilitate principals debugging. */
     uint32_t    debugToken;
 #endif
 
-    JSPrincipals()
-      : refcount(0)
-#ifdef JS_DEBUG
-      , debugToken
-    {
-    }
-#endif
-    {
-    }
+    JSPrincipals() : refcount(0) {}
 
     void setDebugToken(uint32_t token) {
 # ifdef JS_DEBUG
         debugToken = token;
 # endif
     }
 
     /*
--- a/js/public/Proxy.h
+++ b/js/public/Proxy.h
@@ -581,28 +581,20 @@ NewProxyObject(JSContext* cx, const Base
 
 JSObject*
 RenewProxyObject(JSContext* cx, JSObject* obj, BaseProxyHandler* handler, const Value& priv);
 
 class JS_FRIEND_API(AutoEnterPolicy)
 {
   public:
     typedef BaseProxyHandler::Action Action;
-    AutoEnterPolicy(JSContext* cx,
-                    const BaseProxyHandler* handler,
-                    HandleObject wrapper,
-                    HandleId id,
-                    Action act,
-                    bool mayThrow)
-      : rv
-    {
-      false
-    }
+    AutoEnterPolicy(JSContext* cx, const BaseProxyHandler* handler,
+                    HandleObject wrapper, HandleId id, Action act, bool mayThrow)
 #ifdef JS_DEBUG
-    , context(nullptr), enteredAction{}, prev { nullptr }
+        : context(nullptr)
 #endif
     {
         allow = handler->hasSecurityPolicy() ? handler->enter(cx, wrapper, id, act, mayThrow, &rv)
                                              : true;
         recordEnter(cx, wrapper, id, act);
         // We want to throw an exception if all of the following are true:
         // * The policy disallowed access.
         // * The policy set rv to false, indicating that we should throw.
@@ -614,27 +606,21 @@ class JS_FRIEND_API(AutoEnterPolicy)
 
     virtual ~AutoEnterPolicy() { recordLeave(); }
     inline bool allowed() { return allow; }
     inline bool returnValue() { MOZ_ASSERT(!allowed()); return rv; }
 
   protected:
     // no-op constructor for subclass
     AutoEnterPolicy()
-      : allow{ false }
-      , rv
-    {
-      false
-    }
 #ifdef JS_DEBUG
-    , context(nullptr), enteredAction(BaseProxyHandler::NONE), prev { nullptr }
+        : context(nullptr)
+        , enteredAction(BaseProxyHandler::NONE)
 #endif
-    {
-    }
-
+        {}
     void reportErrorIfExceptionIsNotPending(JSContext* cx, jsid id);
     bool allow;
     bool rv;
 
 #ifdef JS_DEBUG
     JSContext* context;
     mozilla::Maybe<HandleObject> enteredProxy;
     mozilla::Maybe<HandleId> enteredId;
--- a/js/public/RootingAPI.h
+++ b/js/public/RootingAPI.h
@@ -540,20 +540,17 @@ class MOZ_NONHEAP_CLASS Handle : public 
     inline
     MOZ_IMPLICIT Handle(MutableHandle<S>& root,
                         typename mozilla::EnableIf<mozilla::IsConvertible<S, T>::value, int>::Type dummy = 0);
 
     DECLARE_POINTER_CONSTREF_OPS(T);
     DECLARE_NONPOINTER_ACCESSOR_METHODS(*ptr);
 
   private:
-    Handle()
-      : ptr{ nullptr }
-    {
-    }
+    Handle() {}
     DELETE_ASSIGNMENT_OPS(Handle, T);
 
     enum Disambiguator { DeliberatelyChoosingThisOverload = 42 };
     enum CallerIdentity { ImUsingThisOnlyInFromFromMarkedLocation = 17 };
     constexpr Handle(const T* p, Disambiguator, CallerIdentity) : ptr(p) {}
 
     const T* ptr;
 };
@@ -602,20 +599,17 @@ class MOZ_STACK_CLASS MutableHandle : pu
         return h;
     }
 
     DECLARE_POINTER_CONSTREF_OPS(T);
     DECLARE_NONPOINTER_ACCESSOR_METHODS(*ptr);
     DECLARE_NONPOINTER_MUTABLE_ACCESSOR_METHODS(*ptr);
 
   private:
-    MutableHandle()
-      : ptr{ nullptr }
-    {
-    }
+    MutableHandle() {}
     DELETE_ASSIGNMENT_OPS(MutableHandle, T);
 
     T* ptr;
 };
 
 } /* namespace JS */
 
 namespace js {