From a4bdad4b8a2492c91185c91ffbb01ef6c979ff02 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 28 Jul 2015 21:20:34 -0400 Subject: [PATCH] Backed out changeset 40c187d91db4 (bug 1183604) for hazard analysis failures. CLOSED TREE --- dom/base/nsWrapperCache.h | 2 -- dom/bindings/BindingUtils.h | 52 ------------------------------------- 2 files changed, 54 deletions(-) diff --git a/dom/base/nsWrapperCache.h b/dom/base/nsWrapperCache.h index af645a66a8b4..b6f37ca78b4c 100644 --- a/dom/base/nsWrapperCache.h +++ b/dom/base/nsWrapperCache.h @@ -322,10 +322,8 @@ private: nsScriptObjectTracer* aTracer); #ifdef DEBUG -public: void CheckCCWrapperTraversal(void* aScriptObjectHolder, nsScriptObjectTracer* aTracer); -private: #endif // DEBUG /** diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h index e77f7d38b04c..fc2e0ab85b8d 100644 --- a/dom/bindings/BindingUtils.h +++ b/dom/bindings/BindingUtils.h @@ -879,52 +879,6 @@ struct TypeNeedsOuterization IsBaseOf::value || IsSame::value; }; -#ifdef DEBUG -template::value> -struct CheckWrapperCacheTracing -{ - static inline void Check(T* aObject) - { - } -}; - -template -struct CheckWrapperCacheTracing -{ - static void Check(T* aObject) - { - nsWrapperCache* wrapperCacheFromQI = nullptr; - aObject->QueryInterface(NS_GET_IID(nsWrapperCache), - reinterpret_cast(&wrapperCacheFromQI)); - - MOZ_ASSERT(wrapperCacheFromQI, - "Missing nsWrapperCache from QueryInterface implementation?"); - - if (!wrapperCacheFromQI->GetWrapperPreserveColor()) { - // Can't assert that we trace the wrapper, since we don't have any - // wrapper to trace. - return; - } - - nsISupports* ccISupports = nullptr; - aObject->QueryInterface(NS_GET_IID(nsCycleCollectionISupports), - reinterpret_cast(&ccISupports)); - MOZ_ASSERT(ccISupports, - "nsWrapperCache object which isn't cycle collectable?"); - - nsXPCOMCycleCollectionParticipant* participant = nullptr; - CallQueryInterface(ccISupports, &participant); - MOZ_ASSERT(participant, "Can't QI to CycleCollectionParticipant?"); - - bool wasPreservingWrapper = wrapperCacheFromQI->PreservingWrapper(); - wrapperCacheFromQI->SetPreservingWrapper(true); - wrapperCacheFromQI->CheckCCWrapperTraversal(ccISupports, participant); - wrapperCacheFromQI->SetPreservingWrapper(wasPreservingWrapper); - } -}; - -#endif - template MOZ_ALWAYS_INLINE bool DoGetOrCreateDOMReflector(JSContext* cx, T* value, @@ -949,12 +903,6 @@ DoGetOrCreateDOMReflector(JSContext* cx, T* value, // figure out whether WrapObject() threw. return false; } - -#ifdef DEBUG - if (IsBaseOf::value) { - CheckWrapperCacheTracing::Check(value); - } -#endif } #ifdef DEBUG