Bug 1140478: Free the string returned by PrintJSStack(), in android shutdown logging function. r=jorendorff

This commit is contained in:
Daniel Holbert 2015-03-11 20:34:38 -07:00
parent 4fa7c2fc52
commit 9a7e657f9a

View File

@ -9,6 +9,7 @@
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "jsprf.h"
#include "nsIDOMWakeLockListener.h"
#include "nsIDOMWindow.h"
#include "nsIObserverService.h"
@ -31,6 +32,7 @@ static void LogFunctionAndJSStack(const char* funcname) {
"Call to %s. The JS stack is:\n%s\n",
funcname,
jsstack ? jsstack : "<no JS stack>");
JS_smprintf_free(jsstack);
}
// bug 839452
#define LOG_FUNCTION_AND_JS_STACK() \