зеркало из https://github.com/mozilla/gecko-dev.git
Bug 943660 (attempt 2) - Remove nsIMemoryReporter::name, because it's (a) unused and (b) a bad idea. r=mccr8.
--HG-- extra : rebase_source : 4381c3c424e34198b83c45fa0ac0d9a670bab2b8
This commit is contained in:
Родитель
b32a4ed166
Коммит
b827292c98
|
@ -448,13 +448,6 @@ ReportGhostWindowsEnumerator(nsUint64HashKey* aIDHashKey, void* aClosure)
|
|||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindowMemoryReporter::GetName(nsACString &aName)
|
||||
{
|
||||
aName.AssignLiteral("window-objects");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindowMemoryReporter::CollectReports(nsIMemoryReporterCallback* aCb,
|
||||
nsISupports* aClosure)
|
||||
|
|
|
@ -50,8 +50,7 @@
|
|||
const PERCENTAGE = Ci.nsIMemoryReporter.UNITS_PERCENTAGE;
|
||||
|
||||
let fakeReporters = [
|
||||
{ name: "fake0",
|
||||
collectReports: function(aCbObj, aClosure) {
|
||||
{ collectReports: function(aCbObj, aClosure) {
|
||||
function f(aP, aK, aU, aA) {
|
||||
aCbObj.callback("", aP, aK, aU, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
@ -88,8 +87,7 @@
|
|||
f("compartments/system/foo", OTHER, COUNT, 1);
|
||||
}
|
||||
},
|
||||
{ name: "fake1",
|
||||
collectReports: function(aCbObj, aClosure) {
|
||||
{ collectReports: function(aCbObj, aClosure) {
|
||||
function f(aP, aK, aU, aA) {
|
||||
aCbObj.callback("", aP, aK, aU, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
@ -104,8 +102,7 @@
|
|||
f("explicit/f/g/h/j", HEAP, BYTES, 10 * MB);
|
||||
}
|
||||
},
|
||||
{ name: "fake2",
|
||||
collectReports: function(aCbObj, aClosure) {
|
||||
{ collectReports: function(aCbObj, aClosure) {
|
||||
function f(aP, aK, aU, aA) {
|
||||
aCbObj.callback("", aP, aK, aU, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
@ -116,8 +113,7 @@
|
|||
f("compartments/user/https:\\\\very-long-url.com\\very-long\\oh-so-long\\really-quite-long.html?a=2&b=3&c=4&d=5&e=abcdefghijklmnopqrstuvwxyz&f=123456789123456789123456789", OTHER, COUNT, 1);
|
||||
}
|
||||
},
|
||||
{ name: "compartments",
|
||||
collectReports: function(aCbObj, aClosure) {
|
||||
{ collectReports: function(aCbObj, aClosure) {
|
||||
function f(aP) {
|
||||
aCbObj.callback("", aP, OTHER, COUNT, 1, "Desc.", aClosure);
|
||||
}
|
||||
|
@ -150,8 +146,7 @@
|
|||
// the largest). Processes without a |resident| memory reporter are saved
|
||||
// for the end.
|
||||
let fakeReporters2 = [
|
||||
{ name: "fake3",
|
||||
collectReports: function(aCbObj, aClosure) {
|
||||
{ collectReports: function(aCbObj, aClosure) {
|
||||
function f(aP1, aP2, aK, aU, aA) {
|
||||
aCbObj.callback(aP1, aP2, aK, aU, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
|
|
@ -45,8 +45,7 @@
|
|||
let jk2Path = "explicit/j/k2";
|
||||
|
||||
let fakeReporters = [
|
||||
{ name: "fake1",
|
||||
collectReports: function(aCbObj, aClosure) {
|
||||
{ collectReports: function(aCbObj, aClosure) {
|
||||
function f(aP, aK, aA) {
|
||||
aCbObj.callback("", aP, aK, BYTES, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
|
|
@ -40,8 +40,7 @@
|
|||
const BYTES = Ci.nsIMemoryReporter.UNITS_BYTES;
|
||||
|
||||
let fakeReporters = [
|
||||
{ name: "fake1",
|
||||
collectReports: function(aCbObj, aClosure) {
|
||||
{ collectReports: function(aCbObj, aClosure) {
|
||||
function f(aP, aK, aA, aD) {
|
||||
aCbObj.callback("", aP, aK, BYTES, aA, aD, aClosure);
|
||||
}
|
||||
|
|
|
@ -175,9 +175,6 @@
|
|||
while (e.hasMoreElements()) {
|
||||
let r = e.getNext().QueryInterface(Ci.nsIMemoryReporter);
|
||||
r.collectReports(handleReport, null);
|
||||
|
||||
// Access |name| to make sure it doesn't crash or assert.
|
||||
dummy = r.name;
|
||||
}
|
||||
|
||||
function checkSpecialReport(aName, aAmounts, aCanBeUnreasonable)
|
||||
|
|
|
@ -147,16 +147,9 @@ interface nsIMemoryReporterCallback : nsISupports
|
|||
* - All other reports are unconstrained except that they must have a
|
||||
* description that is a sentence.
|
||||
*/
|
||||
[scriptable, uuid(53248304-124b-43cd-99dc-6e5797b91618)]
|
||||
[scriptable, uuid(0884cd0f-5829-4381-979b-0f53904030ed)]
|
||||
interface nsIMemoryReporter : nsISupports
|
||||
{
|
||||
/*
|
||||
* The name of the reporter. Useful when only one reporter needs to be run.
|
||||
* Must be unique; if reporters share names it's likely the wrong one will
|
||||
* be called in certain circumstances.
|
||||
*/
|
||||
readonly attribute ACString name;
|
||||
|
||||
/*
|
||||
* Run the reporter.
|
||||
*/
|
||||
|
@ -589,12 +582,6 @@ public:
|
|||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetName(nsACString& aName)
|
||||
{
|
||||
aName.Assign(mName);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD CollectReports(nsIMemoryReporterCallback* aCb,
|
||||
nsISupports* aClosure) = 0;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче