mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 910291 - Hide TraceMalloc debug functions from content. r=bz
This commit is contained in:
parent
890ecab565
commit
537980e822
@ -1836,8 +1836,10 @@ nsJSContext::InitClasses(JS::Handle<JSObject*> aGlobalObj)
|
||||
::JS_DefineProfilingFunctions(cx, aGlobalObj);
|
||||
|
||||
#ifdef NS_TRACE_MALLOC
|
||||
// Attempt to initialize TraceMalloc functions
|
||||
::JS_DefineFunctions(cx, aGlobalObj, TraceMallocFunctions);
|
||||
if (nsContentUtils::IsCallerChrome()) {
|
||||
// Attempt to initialize TraceMalloc functions
|
||||
::JS_DefineFunctions(cx, aGlobalObj, TraceMallocFunctions);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_DMD
|
||||
|
@ -569,16 +569,6 @@ var interfaceNamesInGlobalScope =
|
||||
]
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
||||
var excludedNames = [
|
||||
"TraceMallocDisable", // debug builds only
|
||||
"TraceMallocEnable", // debug builds only
|
||||
"TraceMallocOpenLogFile", // debug builds only
|
||||
"TraceMallocChangeLogFD", // debug builds only
|
||||
"TraceMallocCloseLogFD", // debug builds only
|
||||
"TraceMallocLogTimestamp", // debug builds only
|
||||
"TraceMallocDumpAllocations", // debug builds only
|
||||
];
|
||||
|
||||
function createInterfaceMap(isXBLScope) {
|
||||
var version = SpecialPowers.Cc["@mozilla.org/xre/app-info;1"].getService(SpecialPowers.Ci.nsIXULAppInfo).version;
|
||||
var isNightly = version.endsWith("a1");
|
||||
@ -613,8 +603,7 @@ function runTest(isXBLScope) {
|
||||
var interfaceMap = createInterfaceMap(isXBLScope);
|
||||
for (var name of Object.getOwnPropertyNames(window)) {
|
||||
// An interfae name should start with an upper case character.
|
||||
if (!/^(moz)?[A-Z]/.test(name) ||
|
||||
excludedNames.indexOf(name) >= 0) {
|
||||
if (!/^(moz)?[A-Z]/.test(name)) {
|
||||
continue;
|
||||
}
|
||||
ok(interfaceMap[name],
|
||||
|
Loading…
Reference in New Issue
Block a user