From 17b2aa76508e24b937fc92666bb0513360b103cc Mon Sep 17 00:00:00 2001 From: FranklinDM Date: Mon, 4 Apr 2022 22:54:59 +0800 Subject: Issue #21 - Remove use counters telemetry This reverts Bug 968923 - Implement some equivalent of Chrome's use counters (on top of telemetry?) For reference: https://bugzilla.mozilla.org/show_bug.cgi?id=968923 --- layout/style/ImageLoader.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'layout/style/ImageLoader.cpp') diff --git a/layout/style/ImageLoader.cpp b/layout/style/ImageLoader.cpp index a26a1741aa..5d4f628636 100644 --- a/layout/style/ImageLoader.cpp +++ b/layout/style/ImageLoader.cpp @@ -15,7 +15,6 @@ #include "FrameLayerBuilder.h" #include "nsSVGEffects.h" #include "imgIContainer.h" -#include "Image.h" namespace mozilla { namespace css { @@ -395,14 +394,6 @@ ImageLoader::Notify(imgIRequest* aRequest, int32_t aType, const nsIntRect* aData return OnFrameUpdate(aRequest); } - if (aType == imgINotificationObserver::DECODE_COMPLETE) { - nsCOMPtr image; - aRequest->GetImage(getter_AddRefs(image)); - if (image && mDocument) { - image->PropagateUseCounters(mDocument); - } - } - return NS_OK; } @@ -508,19 +499,5 @@ ImageLoader::UnblockOnload(imgIRequest* aRequest) return NS_OK; } -void -ImageLoader::FlushUseCounters() -{ - for (auto iter = mImages.Iter(); !iter.Done(); iter.Next()) { - nsPtrHashKey* key = iter.Get(); - ImageLoader::Image* image = key->GetKey(); - - imgIRequest* request = image->mRequests.GetWeak(mDocument); - - nsCOMPtr container; - request->GetImage(getter_AddRefs(container)); - } -} - } // namespace css } // namespace mozilla -- cgit v1.2.3