Bug 943660 - Remove nsIMemoryReporter::name, because it's (a) unused and (b) a bad idea. r=mccr8.

--HG--
extra : rebase_source : f2ccff7972d7161e2290fd3db70463524c55f230
This commit is contained in:
Nicholas Nethercote 2013-11-26 18:38:50 -08:00
Родитель fb40afad21
Коммит 19f2e8fdea
6 изменённых файлов: 8 добавлений и 38 удалений

Просмотреть файл

@ -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;