Bug 741349 - Get rid of the mozilla::xpconnect::memory namespace; r=bholley

This commit is contained in:
Ms2ger 2012-04-14 15:05:19 +02:00
parent cdc1f73263
commit cd73c4ce46
4 changed files with 10 additions and 26 deletions

View File

@ -77,7 +77,6 @@ USING_WORKERS_NAMESPACE
using mozilla::MutexAutoLock;
using mozilla::MutexAutoUnlock;
using mozilla::Preferences;
using namespace mozilla::xpconnect::memory;
// The size of the worker runtime heaps in bytes. May be changed via pref.
#define WORKER_DEFAULT_RUNTIME_HEAPSIZE 32 * 1024 * 1024

View File

@ -100,7 +100,6 @@ using mozilla::MutexAutoLock;
using mozilla::TimeDuration;
using mozilla::TimeStamp;
using mozilla::dom::workers::exceptions::ThrowDOMExceptionForCode;
using mozilla::xpconnect::memory::ReportJSRuntimeExplicitTreeStats;
USING_WORKERS_NAMESPACE
using namespace mozilla::dom::workers::events;
@ -263,12 +262,8 @@ public:
// Always report, even if we're disabled, so that we at least get an entry
// in about::memory.
rv = ReportJSRuntimeExplicitTreeStats(rtStats, mPathPrefix, aCallback, aClosure);
if (NS_FAILED(rv)) {
return rv;
}
return NS_OK;
return xpc::ReportJSRuntimeExplicitTreeStats(rtStats, mPathPrefix,
aCallback, aClosure);
}
NS_IMETHOD

View File

@ -68,7 +68,6 @@
#endif
using namespace mozilla;
using namespace mozilla::xpconnect::memory;
/***************************************************************************/
@ -1377,9 +1376,7 @@ MakePath(const nsACString &pathPrefix, const JS::CompartmentStats &cStats,
nsDependentCString(reporterName);
}
namespace mozilla {
namespace xpconnect {
namespace memory {
namespace xpc {
static nsresult
ReportCompartmentStats(const JS::CompartmentStats &cStats,
@ -1641,9 +1638,7 @@ ReportJSRuntimeExplicitTreeStats(const JS::RuntimeStats &rtStats,
return NS_OK;
}
} // namespace memory
} // namespace xpconnect
} // namespace mozilla
} // namespace xpc
NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(JsMallocSizeOf, "js")
@ -1762,7 +1757,8 @@ public:
// "explicit" tree, then we report other stuff.
nsresult rv =
ReportJSRuntimeExplicitTreeStats(rtStats, pathPrefix, cb, closure);
xpc::ReportJSRuntimeExplicitTreeStats(rtStats, pathPrefix, cb,
closure);
NS_ENSURE_SUCCESS(rv, rv);
REPORT_BYTES(pathPrefix + NS_LITERAL_CSTRING("xpconnect"),

View File

@ -209,6 +209,8 @@ xpc_UnmarkSkippableJSHolders();
NS_EXPORT_(void)
xpc_ActivateDebugMode();
class nsIMemoryMultiReporterCallback;
namespace xpc {
// If these functions return false, then an exception will be set on cx.
@ -250,14 +252,6 @@ bool
DOM_DefineQuickStubs(JSContext *cx, JSObject *proto, PRUint32 flags,
PRUint32 interfaceCount, const nsIID **interfaceArray);
} // namespace xpc
class nsIMemoryMultiReporterCallback;
namespace mozilla {
namespace xpconnect {
namespace memory {
// This reports all the stats in |rtStats| that belong in the "explicit" tree,
// (which isn't all of them).
nsresult
@ -266,9 +260,9 @@ ReportJSRuntimeExplicitTreeStats(const JS::RuntimeStats &rtStats,
nsIMemoryMultiReporterCallback *cb,
nsISupports *closure);
} // namespace memory
} // namespace xpconnect
} // namespace xpc
namespace mozilla {
namespace dom {
namespace binding {