diff --git a/layout/style/nsCSSValue.cpp b/layout/style/nsCSSValue.cpp index bc42a7e209b..c95869203d5 100644 --- a/layout/style/nsCSSValue.cpp +++ b/layout/style/nsCSSValue.cpp @@ -2480,18 +2480,9 @@ css::ImageValue::ImageValue(nsIURI* aURI, nsStringBuffer* aString, css::ImageValue::~ImageValue() { for (auto iter = mRequests.Iter(); !iter.Done(); iter.Next()) { - nsISupports* key = iter.Key(); + nsIDocument* doc = iter.Key(); RefPtr& proxy = iter.Data(); - nsIDocument* doc = static_cast(key); - -#ifdef DEBUG - { - nsCOMPtr slowDoc = do_QueryInterface(key); - MOZ_ASSERT(slowDoc == doc); - } -#endif - if (doc) { doc->StyleImageLoader()->DeregisterCSSImage(this); } diff --git a/layout/style/nsCSSValue.h b/layout/style/nsCSSValue.h index 6c27d6e2ccb..1d912fa5be6 100644 --- a/layout/style/nsCSSValue.h +++ b/layout/style/nsCSSValue.h @@ -147,7 +147,7 @@ private: public: // Inherit operator== from URLValue - nsRefPtrHashtable, imgRequestProxy> mRequests; + nsRefPtrHashtable, imgRequestProxy> mRequests; // Override AddRef and Release to not only log ourselves correctly, but // also so that we delete correctly without a virtual destructor (assuming