зеркало из https://github.com/mozilla/gecko-dev.git
Bug 702029 - Push all console logging to androids adb logcat. r=blassey
This commit is contained in:
Родитель
b68bf1210e
Коммит
cc665b3b37
|
@ -53,6 +53,10 @@
|
|||
#include "nsConsoleMessage.h"
|
||||
#include "nsIClassInfoImpl.h"
|
||||
|
||||
#if defined(ANDROID)
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
NS_IMPL_THREADSAFE_ADDREF(nsConsoleService)
|
||||
|
@ -135,6 +139,16 @@ nsConsoleService::LogMessage(nsIConsoleMessage *message)
|
|||
{
|
||||
MutexAutoLock lock(mLock);
|
||||
|
||||
#if defined(ANDROID)
|
||||
{
|
||||
nsXPIDLString msg;
|
||||
message->GetMessageMoz(getter_Copies(msg));
|
||||
__android_log_print(ANDROID_LOG_ERROR, "Gecko *** Console Service *** ",
|
||||
"%s",
|
||||
NS_LossyConvertUTF16toASCII(msg).get());
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there's already a message in the slot we're about to replace,
|
||||
* we've wrapped around, and we need to release the old message. We
|
||||
|
|
Загрузка…
Ссылка в новой задаче