зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1293117 (part 5) - Change many NS_METHOD occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods. - NS_METHOD F() override; --> NS_IMETHOD F() override; - NS_METHOD F() override {...} --> NS_IMETHOD F() override {...} - NS_METHOD F() final; --> NS_IMETHOD F() final; - NS_METHOD F() final {...} --> NS_IMETHOD F() final {...} Using NS_IMETHOD is the preferred way of marking in-class virtual methods. Although these transformations add an explicit |virtual|, they are safe -- there's an implicit |virtual| anyway because |override| and |final| only work with virtual methods. --HG-- extra : rebase_source : 3010fade82a170eab7f13d81bf61b02cd693f3cf
This commit is contained in:
Родитель
bab6d17ebf
Коммит
8f51d02c97
|
@ -442,7 +442,7 @@ public:
|
|||
{
|
||||
MOZ_ASSERT(mManager);
|
||||
}
|
||||
NS_METHOD Run() override
|
||||
NS_IMETHOD Run() override
|
||||
{
|
||||
mManager->OnConnect(EmptyString());
|
||||
return NS_OK;
|
||||
|
@ -475,7 +475,7 @@ public:
|
|||
{
|
||||
MOZ_ASSERT(mManager);
|
||||
}
|
||||
NS_METHOD Run() override
|
||||
NS_IMETHOD Run() override
|
||||
{
|
||||
mManager->OnDisconnect(EmptyString());
|
||||
return NS_OK;
|
||||
|
|
|
@ -73,7 +73,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
NS_IMETHOD
|
||||
CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
|
||||
|
||||
NS_METHOD GetPluginInstance(nsNPAPIPluginInstance** aPluginInstance) override;
|
||||
NS_IMETHOD GetPluginInstance(nsNPAPIPluginInstance** aPluginInstance) override;
|
||||
|
||||
virtual void SetIsDocumentActive(bool aIsActive) override;
|
||||
|
||||
|
|
|
@ -594,7 +594,7 @@ public:
|
|||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
|
||||
NS_METHOD Run() override {
|
||||
NS_IMETHOD Run() override {
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
TimeStamp dispatchDate = TimeStamp::Now();
|
||||
|
||||
|
|
|
@ -2126,7 +2126,7 @@ public:
|
|||
, mAppendAppNotes(true)
|
||||
{}
|
||||
|
||||
NS_METHOD Run() override;
|
||||
NS_IMETHOD Run() override;
|
||||
|
||||
private:
|
||||
nsCString mKey;
|
||||
|
|
|
@ -27,28 +27,28 @@ class nsDeviceContextSpecProxy final : public nsIDeviceContextSpec
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPrintSettings,
|
||||
NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPrintSettings,
|
||||
bool aIsPrintPreview) final;
|
||||
|
||||
virtual already_AddRefed<PrintTarget> MakePrintTarget() final;
|
||||
|
||||
NS_METHOD GetDrawEventRecorder(mozilla::gfx::DrawEventRecorder** aDrawEventRecorder) final;
|
||||
NS_IMETHOD GetDrawEventRecorder(mozilla::gfx::DrawEventRecorder** aDrawEventRecorder) final;
|
||||
|
||||
float GetDPI() final;
|
||||
|
||||
float GetPrintingScale() final;
|
||||
|
||||
NS_METHOD BeginDocument(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName,
|
||||
int32_t aStartPage, int32_t aEndPage) final;
|
||||
NS_IMETHOD BeginDocument(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName,
|
||||
int32_t aStartPage, int32_t aEndPage) final;
|
||||
|
||||
NS_METHOD EndDocument() final;
|
||||
NS_IMETHOD EndDocument() final;
|
||||
|
||||
NS_METHOD AbortDocument() final;
|
||||
NS_IMETHOD AbortDocument() final;
|
||||
|
||||
NS_METHOD BeginPage() final;
|
||||
NS_IMETHOD BeginPage() final;
|
||||
|
||||
NS_METHOD EndPage() final;
|
||||
NS_IMETHOD EndPage() final;
|
||||
|
||||
private:
|
||||
~nsDeviceContextSpecProxy() {}
|
||||
|
|
|
@ -804,8 +804,8 @@ class WindowsAddressSpaceReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
// First iterate over all the segments and record how many of each kind
|
||||
// there were and their aggregate sizes. We use a hash table for this
|
||||
|
@ -987,8 +987,8 @@ class VsizeMaxContiguousReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
int64_t amount;
|
||||
nsresult rv = VsizeMaxContiguousDistinguishedAmount(&amount);
|
||||
|
@ -1010,8 +1010,8 @@ class PrivateReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
int64_t amount;
|
||||
nsresult rv = PrivateDistinguishedAmount(&amount);
|
||||
|
@ -1034,8 +1034,8 @@ class VsizeReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
int64_t amount;
|
||||
nsresult rv = VsizeDistinguishedAmount(&amount);
|
||||
|
@ -1061,8 +1061,8 @@ class ResidentReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
int64_t amount;
|
||||
nsresult rv = ResidentDistinguishedAmount(&amount);
|
||||
|
@ -1090,8 +1090,8 @@ class ResidentUniqueReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
int64_t amount = 0;
|
||||
nsresult rv = ResidentUniqueDistinguishedAmount(&amount);
|
||||
|
@ -1118,8 +1118,8 @@ class SystemHeapReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
int64_t amount;
|
||||
nsresult rv = SystemHeapSize(&amount);
|
||||
|
@ -1174,8 +1174,8 @@ class ResidentPeakReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
int64_t amount = 0;
|
||||
nsresult rv = ResidentPeakDistinguishedAmount(&amount);
|
||||
|
@ -1197,8 +1197,8 @@ class PageFaultsSoftReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
struct rusage usage;
|
||||
int err = getrusage(RUSAGE_SELF, &usage);
|
||||
|
@ -1241,8 +1241,8 @@ class PageFaultsHardReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
int64_t amount = 0;
|
||||
nsresult rv = PageFaultsHardDistinguishedAmount(&amount);
|
||||
|
@ -1298,8 +1298,8 @@ class JemallocHeapReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
jemalloc_stats_t stats;
|
||||
jemalloc_stats(&stats);
|
||||
|
@ -1392,8 +1392,8 @@ class AtomTablesReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
size_t Main, Static;
|
||||
NS_SizeOfAtomTablesIncludingThis(MallocSizeOf, &Main, &Static);
|
||||
|
@ -1429,8 +1429,8 @@ class DeadlockDetectorReporter final : public nsIMemoryReporter
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) override
|
||||
{
|
||||
return MOZ_COLLECT_REPORT(
|
||||
"explicit/deadlock-detector", KIND_HEAP, UNITS_BYTES,
|
||||
|
|
|
@ -173,7 +173,7 @@ protected:
|
|||
: mQueue(aQueue)
|
||||
{
|
||||
}
|
||||
NS_METHOD Run() override;
|
||||
NS_IMETHOD Run() override;
|
||||
private:
|
||||
RefPtr<TaskQueue> mQueue;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче