mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 1375281 - Part 1: Add getHeapAllocatedAsync() to nsIMemoryReporter.idl. r=erahm
nsIMemoryReporter::getHeapAllocatedAsync() is added to get attribute 'heapAllocated' asynchronously. MozReview-Commit-ID: 96KyZpCeTG1 --HG-- extra : rebase_source : 5c27b26788a3a96821ce054911dda8ce2932007d extra : amend_source : fcb923dac2dfa9d7aa5bf520d38c5bb11f0d60e9 extra : histedit_source : 83ae65c153f7cef6c6529296838a9d9aa367219e
This commit is contained in:
parent
e171eb9a00
commit
9b7ab955c8
@ -205,6 +205,12 @@ interface nsIFinishReportingCallback : nsISupports
|
||||
void callback(in nsISupports data);
|
||||
};
|
||||
|
||||
[scriptable, function, uuid(1a80cd0f-0d9e-4397-be69-68ad28fe5175)]
|
||||
interface nsIHeapAllocatedCallback : nsISupports
|
||||
{
|
||||
void callback(in int64_t bytesAllocated);
|
||||
};
|
||||
|
||||
[scriptable, builtinclass, uuid(2998574d-8993-407a-b1a5-8ad7417653e1)]
|
||||
interface nsIMemoryReporterManager : nsISupports
|
||||
{
|
||||
@ -411,6 +417,12 @@ interface nsIMemoryReporterManager : nsISupports
|
||||
[infallible] readonly attribute boolean isDMDEnabled;
|
||||
[infallible] readonly attribute boolean isDMDRunning;
|
||||
|
||||
/*
|
||||
* Asynchronously gets attribute 'heapAllocated'. The value is returned in
|
||||
* the callback argument.
|
||||
*/
|
||||
[must_use] void getHeapAllocatedAsync(in nsIHeapAllocatedCallback callback);
|
||||
|
||||
/*
|
||||
* Run a series of GC/CC's in an attempt to minimize the application's memory
|
||||
* usage. When we're finished, we invoke the given runnable if it's not
|
||||
|
@ -2373,6 +2373,12 @@ nsMemoryReporterManager::GetHeapAllocated(int64_t* aAmount)
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMemoryReporterManager::GetHeapAllocatedAsync(nsIHeapAllocatedCallback *aCallback)
|
||||
{
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
// This has UNITS_PERCENTAGE, so it is multiplied by 100x.
|
||||
NS_IMETHODIMP
|
||||
nsMemoryReporterManager::GetHeapOverheadFraction(int64_t* aAmount)
|
||||
|
Loading…
Reference in New Issue
Block a user