1
0
forked from mirrors/0ad

JS_DumpHeap is removed in SpiderMonkey 38, since we have nothing using it remove it. Refs #3708.

https://bugzilla.mozilla.org/show_bug.cgi?id=1105069
https://bugzilla.mozilla.org/show_bug.cgi?id=1122842

This was SVN commit r17630.
This commit is contained in:
leper
2016-01-11 20:03:09 +00:00
parent 785acdb1c6
commit d08044c8ad
6 changed files with 4 additions and 37 deletions
@@ -1102,16 +1102,6 @@ void* ScriptInterface::GetPrivate(JS::HandleObject obj)
return JS_GetPrivate(obj);
}
void ScriptInterface::DumpHeap()
{
#if MOZJS_DEBUG_ABI
JS_DumpHeap(GetJSRuntime(), stderr, NULL, JSTRACE_OBJECT, NULL, (size_t)-1, NULL);
#endif
fprintf(stderr, "# Bytes allocated: %u\n", JS_GetGCParameter(GetJSRuntime(), JSGC_BYTES));
JS_GC(GetJSRuntime());
fprintf(stderr, "# Bytes allocated after GC: %u\n", JS_GetGCParameter(GetJSRuntime(), JSGC_BYTES));
}
void ScriptInterface::MaybeGC()
{
JS_MaybeGC(m->m_cx);
+1 -6
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2016 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -313,11 +313,6 @@ public:
*/
template<typename T> static void ToJSVal(JSContext* cx, JS::MutableHandleValue ret, T const& val);
/**
* Dump some memory heap debugging information to stderr.
*/
void DumpHeap();
/**
* MaybeGC tries to determine whether garbage collection in cx's runtime would free up enough memory to be worth the amount of time it would take.
* This calls JS_MaybeGC directly, which does not do incremental GC. Usually you should prefer MaybeIncrementalRuntimeGC.
+1 -9
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2014 Wildfire Games.
/* Copyright (C) 2016 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -28,14 +28,6 @@
# endif
#endif
// Guess whether the library was compiled with the release-mode or debug-mode ABI
// (for JS_DumpHeap etc)
#if defined(DEBUG) && !defined(WITH_SYSTEM_MOZJS31)
# define MOZJS_DEBUG_ABI 1
#else
# define MOZJS_DEBUG_ABI 0
#endif
// Ignore some harmless warnings
#if GCC_VERSION
# pragma GCC diagnostic push