mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1280355 part.2 TextInputHandler should use LazyLogModule instead of PR_NewLogModule() r=m_kato
For making TextInputHandler MOZ_LOG* environment variables aware, TextInputHandler should use LazyLogModule. MozReview-Commit-ID: 9La229BFaJ1 --HG-- extra : rebase_source : f18f689ea6522f3300c5411bcd9e49d4c31143e4
This commit is contained in:
parent
a39783f70c
commit
9b89c75f4d
@ -27,7 +27,7 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
PRLogModuleInfo* gLog = nullptr;
|
||||
LazyLogModule gLog("TextInputHandlerWidgets");
|
||||
|
||||
static const char*
|
||||
OnOrOff(bool aBool)
|
||||
@ -292,11 +292,11 @@ IsControlChar(uint32_t aCharCode)
|
||||
static uint32_t gHandlerInstanceCount = 0;
|
||||
|
||||
static void
|
||||
InitLogModule()
|
||||
EnsureToLogAllKeyboardLayoutsAndIMEs()
|
||||
{
|
||||
// Clear() is always called when TISInputSourceWrappper is created.
|
||||
if (!gLog) {
|
||||
gLog = PR_NewLogModule("TextInputHandlerWidgets");
|
||||
static bool sDone = false;
|
||||
if (!sDone) {
|
||||
sDone = true;
|
||||
TextInputHandler::DebugPrintAllKeyboardLayouts();
|
||||
IMEInputHandler::DebugPrintAllIMEModes();
|
||||
}
|
||||
@ -721,7 +721,7 @@ void
|
||||
TISInputSourceWrapper::Clear()
|
||||
{
|
||||
// Clear() is always called when TISInputSourceWrappper is created.
|
||||
InitLogModule();
|
||||
EnsureToLogAllKeyboardLayoutsAndIMEs();
|
||||
|
||||
if (mInputSourceList) {
|
||||
::CFRelease(mInputSourceList);
|
||||
@ -1494,7 +1494,7 @@ TextInputHandler::TextInputHandler(nsChildView* aWidget,
|
||||
NSView<mozView> *aNativeView) :
|
||||
IMEInputHandler(aWidget, aNativeView)
|
||||
{
|
||||
InitLogModule();
|
||||
EnsureToLogAllKeyboardLayoutsAndIMEs();
|
||||
[mView installTextInputHandler:this];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user