Bug 1691861 - Make IconLoader not cycle-collected. r=mconley

It no longer needs to be cycle-collected because it doesn't have any strong
references to other cycle-collected objects anymore.

Differential Revision: https://phabricator.services.mozilla.com/D104622
This commit is contained in:
Markus Stange 2021-02-12 00:32:02 +00:00
parent f2b2f2df08
commit bab886edca
2 changed files with 2 additions and 10 deletions

View File

@ -16,13 +16,7 @@ using namespace mozilla;
namespace mozilla::widget {
NS_IMPL_CYCLE_COLLECTION(mozilla::widget::IconLoader)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(mozilla::widget::IconLoader)
NS_INTERFACE_MAP_ENTRY(imgINotificationObserver)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(mozilla::widget::IconLoader)
NS_IMPL_CYCLE_COLLECTING_RELEASE(mozilla::widget::IconLoader)
NS_IMPL_ISUPPORTS(IconLoader, imgINotificationObserver)
IconLoader::IconLoader(Helper* aHelper, const nsIntRect& aImageRegionRect)
: mContentType(nsIContentPolicy::TYPE_INTERNAL_IMAGE),

View File

@ -9,7 +9,6 @@
#include "imgINotificationObserver.h"
#include "mozilla/RefPtr.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIContentPolicy.h"
#include "nsISupports.h"
@ -52,9 +51,8 @@ class IconLoader : public imgINotificationObserver {
IconLoader(Helper* aHelper, const nsIntRect& aImageRegionRect);
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_ISUPPORTS
NS_DECL_IMGINOTIFICATIONOBSERVER
NS_DECL_CYCLE_COLLECTION_CLASS(IconLoader)
// LoadIcon will start a load request for the icon.
// The request may not complete until after LoadIcon returns.