[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

ap at apple.com ap at apple.com
Fri Feb 26 22:25:58 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 92e424f2b3631ff267c2c0d7abc47dd8741e050b
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Feb 19 23:44:56 2010 +0000

            Reviewed by Geoffrey Garen.
    
            https://bugs.webkit.org/show_bug.cgi?id=35178
            LiveConnect code uses hand-rolled fprintf logging
    
            Changed to use LOG, LOG_ERROR and ASSERT.
    
            * platform/Logging.cpp:
            (WebCore::getChannelFromName):
            * platform/Logging.h:
            * platform/mac/LoggingMac.mm:
            (WebCore::InitializeLoggingChannelsIfNecessary):
            * platform/win/LoggingWin.cpp:
            (WebCore::InitializeLoggingChannelsIfNecessary):
            TextConversion channel was (almost) unused, renamed to LiveConnect.
    
            * platform/text/gtk/TextCodecGtk.cpp: (WebCore::TextCodecGtk::registerEncodingNames):
            The only use of this channel was in platform specific code, commandeered it for cross-platform
            needs.
    
            * bridge/jni/JNIBridge.cpp:
            * bridge/jni/JNIUtility.cpp:
            (JSC::Bindings::getJavaVM):
            (JSC::Bindings::getJNIEnv):
            (JSC::Bindings::getJNIField):
            * bridge/jni/JNIUtility.h:
            (JSC::Bindings::callJNIMethodV):
            (JSC::Bindings::callJNIStaticMethod):
            * bridge/jni/jni_jsobject.mm:
            (completedJavaScriptAccess):
            (dispatchToJavaScriptThread):
            (performJavaScriptAccess):
            (JavaJSObject::invoke):
            (JavaJSObject::call):
            (JavaJSObject::eval):
            (JavaJSObject::getMember):
            (JavaJSObject::setMember):
            (JavaJSObject::removeMember):
            (JavaJSObject::getSlot):
            (JavaJSObject::setSlot):
            (JavaJSObject::toString):
            (JavaJSObject::createNative):
            * bridge/jni/jsc/JNIBridgeJSC.cpp:
            (JavaField::valueFromInstance):
            (JavaField::setValueToInstance):
            * bridge/jni/jsc/JavaClassJSC.cpp:
            (JavaClass::JavaClass):
            * bridge/jni/jsc/JavaInstanceJSC.cpp:
            (JavaInstance::invokeMethod):
            (JObjectWrapper::JObjectWrapper):
            (JObjectWrapper::~JObjectWrapper):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55036 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 01d1a54..cdb2c43 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,57 @@
+2010-02-19  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Geoffrey Garen.
+
+        https://bugs.webkit.org/show_bug.cgi?id=35178
+        LiveConnect code uses hand-rolled fprintf logging
+
+        Changed to use LOG, LOG_ERROR and ASSERT.
+
+        * platform/Logging.cpp:
+        (WebCore::getChannelFromName):
+        * platform/Logging.h:
+        * platform/mac/LoggingMac.mm:
+        (WebCore::InitializeLoggingChannelsIfNecessary):
+        * platform/win/LoggingWin.cpp:
+        (WebCore::InitializeLoggingChannelsIfNecessary):
+        TextConversion channel was (almost) unused, renamed to LiveConnect.
+
+        * platform/text/gtk/TextCodecGtk.cpp: (WebCore::TextCodecGtk::registerEncodingNames):
+        The only use of this channel was in platform specific code, commandeered it for cross-platform
+        needs.
+
+        * bridge/jni/JNIBridge.cpp:
+        * bridge/jni/JNIUtility.cpp:
+        (JSC::Bindings::getJavaVM):
+        (JSC::Bindings::getJNIEnv):
+        (JSC::Bindings::getJNIField):
+        * bridge/jni/JNIUtility.h:
+        (JSC::Bindings::callJNIMethodV):
+        (JSC::Bindings::callJNIStaticMethod):
+        * bridge/jni/jni_jsobject.mm:
+        (completedJavaScriptAccess):
+        (dispatchToJavaScriptThread):
+        (performJavaScriptAccess):
+        (JavaJSObject::invoke):
+        (JavaJSObject::call):
+        (JavaJSObject::eval):
+        (JavaJSObject::getMember):
+        (JavaJSObject::setMember):
+        (JavaJSObject::removeMember):
+        (JavaJSObject::getSlot):
+        (JavaJSObject::setSlot):
+        (JavaJSObject::toString):
+        (JavaJSObject::createNative):
+        * bridge/jni/jsc/JNIBridgeJSC.cpp:
+        (JavaField::valueFromInstance):
+        (JavaField::setValueToInstance):
+        * bridge/jni/jsc/JavaClassJSC.cpp:
+        (JavaClass::JavaClass):
+        * bridge/jni/jsc/JavaInstanceJSC.cpp:
+        (JavaInstance::invokeMethod):
+        (JObjectWrapper::JObjectWrapper):
+        (JObjectWrapper::~JObjectWrapper):
+
 2010-02-19  Dirk Schulze  <krit at webkit.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/bridge/jni/JNIBridge.cpp b/WebCore/bridge/jni/JNIBridge.cpp
index f8a3979..778d4c3 100644
--- a/WebCore/bridge/jni/JNIBridge.cpp
+++ b/WebCore/bridge/jni/JNIBridge.cpp
@@ -33,15 +33,6 @@
 #include "StringBuilder.h"
 
 
-#ifdef NDEBUG
-#define JS_LOG(formatAndArgs...) ((void)0)
-#else
-#define JS_LOG(formatAndArgs...) { \
-    fprintf(stderr, "%s:%d -- %s:  ", __FILE__, __LINE__, __FUNCTION__); \
-    fprintf(stderr, formatAndArgs); \
-}
-#endif
-
 using namespace JSC;
 using namespace JSC::Bindings;
 using namespace WebCore;
diff --git a/WebCore/bridge/jni/JNIUtility.cpp b/WebCore/bridge/jni/JNIUtility.cpp
index ee45710..c5501b8 100644
--- a/WebCore/bridge/jni/JNIUtility.cpp
+++ b/WebCore/bridge/jni/JNIUtility.cpp
@@ -77,7 +77,7 @@ JavaVM* getJavaVM()
     if (jniError == JNI_OK && nJVMs > 0)
         jvm = jvmArray[0];
     else
-        fprintf(stderr, "%s: JNI_GetCreatedJavaVMs failed, returned %ld\n", __PRETTY_FUNCTION__, static_cast<long>(jniError));
+        LOG_ERROR("JNI_GetCreatedJavaVMs failed, returned %ld", static_cast<long>(jniError));
 
     return jvm;
 }
@@ -93,7 +93,7 @@ JNIEnv* getJNIEnv()
     jniError = getJavaVM()->AttachCurrentThread(&u.dummy, 0);
     if (jniError == JNI_OK)
         return u.env;
-    fprintf(stderr, "%s: AttachCurrentThread failed, returned %ld\n", __PRETTY_FUNCTION__, static_cast<long>(jniError));
+    LOG_ERROR("AttachCurrentThread failed, returned %ld", static_cast<long>(jniError));
     return 0;
 }
 
@@ -319,10 +319,10 @@ jvalue getJNIField(jobject obj, JNIType type, const char* name, const char* sign
                     result.d = env->functions->GetDoubleField(env, obj, field);
                     break;
                 default:
-                    fprintf(stderr, "%s: invalid field type (%d)\n", __PRETTY_FUNCTION__, static_cast<int>(type));
+                    LOG_ERROR("Invalid field type (%d)", static_cast<int>(type));
                 }
             } else {
-                fprintf(stderr, "%s: Could not find field: %s\n", __PRETTY_FUNCTION__, name);
+                LOG_ERROR("Could not find field: %s", name);
                 env->ExceptionDescribe();
                 env->ExceptionClear();
                 fprintf(stderr, "\n");
@@ -330,7 +330,7 @@ jvalue getJNIField(jobject obj, JNIType type, const char* name, const char* sign
 
             env->DeleteLocalRef(cls);
         } else
-            fprintf(stderr, "%s: Could not find class for object\n", __PRETTY_FUNCTION__);
+            LOG_ERROR("Could not find class for object");
     }
 
     return result;
diff --git a/WebCore/bridge/jni/JNIUtility.h b/WebCore/bridge/jni/JNIUtility.h
index c832ef3..0eb889c 100644
--- a/WebCore/bridge/jni/JNIUtility.h
+++ b/WebCore/bridge/jni/JNIUtility.h
@@ -212,14 +212,14 @@ static T callJNIMethodV(jobject obj, const char* name, const char* sig, va_list
                 env->DeleteLocalRef(cls);
                 return JNICaller<T>::callV(obj, mid, args);
             }
-            fprintf(stderr, "%s: Could not find method: %s for %p\n", __PRETTY_FUNCTION__, name, obj);
+            LOG_ERROR("Could not find method: %s for %p", name, obj);
             env->ExceptionDescribe();
             env->ExceptionClear();
             fprintf(stderr, "\n");
 
             env->DeleteLocalRef(cls);
         } else
-            fprintf(stderr, "%s: Could not find class for %p\n", __PRETTY_FUNCTION__, obj);
+            LOG_ERROR("Could not find class for %p", obj);
     }
 
     return 0;
@@ -254,7 +254,7 @@ T callJNIStaticMethod(jclass cls, const char* methodName, const char* methodSign
         if (mid)
             result = JNICaller<T>::callStaticV(cls, mid, args);
         else {
-            fprintf(stderr, "%s: Could not find method: %s for %p\n", __PRETTY_FUNCTION__, methodName, cls);
+            LOG_ERROR("Could not find method: %s for %p", methodName, cls);
             env->ExceptionDescribe();
             env->ExceptionClear();
             fprintf(stderr, "\n");
diff --git a/WebCore/bridge/jni/jni_jsobject.mm b/WebCore/bridge/jni/jni_jsobject.mm
index 603624f..68682bb 100644
--- a/WebCore/bridge/jni/jni_jsobject.mm
+++ b/WebCore/bridge/jni/jni_jsobject.mm
@@ -33,6 +33,7 @@
 #include "JNIUtility.h"
 #include "JNIUtilityPrivate.h"
 #include "JSDOMBinding.h"
+#include "Logging.h"
 #include "ScriptController.h"
 #include "StringSourceProvider.h"
 #include "WebCoreFrameView.h"
@@ -42,21 +43,12 @@
 #include <runtime/Completion.h>
 #include <runtime/JSGlobalObject.h>
 #include <runtime/JSLock.h>
-#include <wtf/Assertions.h>
 
 using WebCore::Frame;
 
 using namespace JSC::Bindings;
 using namespace JSC;
-
-#ifdef NDEBUG
-#define JS_LOG(formatAndArgs...) ((void)0)
-#else
-#define JS_LOG(formatAndArgs...) { \
-    fprintf (stderr, "%s(%p,%p):  ", __PRETTY_FUNCTION__, _performJavaScriptRunLoop, CFRunLoopGetCurrent()); \
-    fprintf(stderr, formatAndArgs); \
-}
-#endif
+using namespace WebCore;
 
 #define UndefinedHandle 1
 
@@ -68,12 +60,12 @@ static CFRunLoopSourceRef completionSource;
 
 static void completedJavaScriptAccess (void *i)
 {
-    assert (CFRunLoopGetCurrent() != _performJavaScriptRunLoop);
+    ASSERT(CFRunLoopGetCurrent() != _performJavaScriptRunLoop);
     
     JSObjectCallContext *callContext = (JSObjectCallContext *)i;
     CFRunLoopRef runLoop = (CFRunLoopRef)callContext->originatingLoop;
     
-    assert (CFRunLoopGetCurrent() == runLoop);
+    ASSERT(CFRunLoopGetCurrent() == runLoop);
     
     CFRunLoopStop(runLoop);
 }
@@ -115,7 +107,7 @@ static void dispatchToJavaScriptThread(JSObjectCallContext *context)
     
     CFRunLoopRef currentRunLoop = CFRunLoopGetCurrent();
     
-    assert (currentRunLoop != _performJavaScriptRunLoop);
+    ASSERT(currentRunLoop != _performJavaScriptRunLoop);
     
     // Setup a source to signal once the invocation of the JavaScript
     // call completes.
@@ -144,7 +136,7 @@ static void dispatchToJavaScriptThread(JSObjectCallContext *context)
 
 static void performJavaScriptAccess(void*)
 {
-    assert (CFRunLoopGetCurrent() == _performJavaScriptRunLoop);
+    ASSERT(CFRunLoopGetCurrent() == _performJavaScriptRunLoop);
     
     // Dispatch JavaScript calls here.
     CFRunLoopSourceContext sourceContext;
@@ -205,7 +197,7 @@ jvalue JavaJSObject::invoke(JSObjectCallContext *context)
         else {
             JSObject *imp = jlong_to_impptr(nativeHandle);
             if (!findProtectingRootObject(imp)) {
-                fprintf (stderr, "%s:%d:  Attempt to access JavaScript from destroyed applet, type %d.\n", __FILE__, __LINE__, context->type);
+                LOG_ERROR("Attempt to access JavaScript from destroyed applet, type %d.", context->type);
                 return result;
             }
 
@@ -256,7 +248,7 @@ jvalue JavaJSObject::invoke(JSObjectCallContext *context)
                 }
                 
                 default: {
-                    fprintf (stderr, "%s:  invalid JavaScript call\n", __PRETTY_FUNCTION__);
+                    LOG_ERROR("invalid JavaScript call");
                 }
             }
         }
@@ -283,7 +275,7 @@ RootObject* JavaJSObject::rootObject() const
 
 jobject JavaJSObject::call(jstring methodName, jobjectArray args) const
 {
-    JS_LOG ("methodName = %s\n", JavaString(methodName).UTF8String());
+    LOG(LiveConnect, "JavaJSObject::call methodName = %s", JavaString(methodName).UTF8String());
 
     RootObject* rootObject = this->rootObject();
     if (!rootObject)
@@ -312,7 +304,7 @@ jobject JavaJSObject::call(jstring methodName, jobjectArray args) const
 
 jobject JavaJSObject::eval(jstring script) const
 {
-    JS_LOG ("script = %s\n", JavaString(script).UTF8String());
+    LOG(LiveConnect, "JavaJSObject::eval script = %s", JavaString(script).UTF8String());
     
     JSValue result;
 
@@ -339,7 +331,7 @@ jobject JavaJSObject::eval(jstring script) const
 
 jobject JavaJSObject::getMember(jstring memberName) const
 {
-    JS_LOG ("(%p) memberName = %s\n", _imp, JavaString(memberName).UTF8String());
+    LOG(LiveConnect, "JavaJSObject::getMember (%p) memberName = %s", _imp, JavaString(memberName).UTF8String());
 
     RootObject* rootObject = this->rootObject();
     if (!rootObject)
@@ -355,7 +347,7 @@ jobject JavaJSObject::getMember(jstring memberName) const
 
 void JavaJSObject::setMember(jstring memberName, jobject value) const
 {
-    JS_LOG ("memberName = %s, value = %p\n", JavaString(memberName).UTF8String(), value);
+    LOG(LiveConnect, "JavaJSObject::setMember memberName = %s, value = %p", JavaString(memberName).UTF8String(), value);
 
     RootObject* rootObject = this->rootObject();
     if (!rootObject)
@@ -371,7 +363,7 @@ void JavaJSObject::setMember(jstring memberName, jobject value) const
 
 void JavaJSObject::removeMember(jstring memberName) const
 {
-    JS_LOG ("memberName = %s\n", JavaString(memberName).UTF8String());
+    LOG(LiveConnect, "JavaJSObject::removeMember memberName = %s", JavaString(memberName).UTF8String());
 
     RootObject* rootObject = this->rootObject();
     if (!rootObject)
@@ -385,11 +377,7 @@ void JavaJSObject::removeMember(jstring memberName) const
 
 jobject JavaJSObject::getSlot(jint index) const
 {
-#ifdef __LP64__
-    JS_LOG ("index = %d\n", index);
-#else
-    JS_LOG ("index = %ld\n", index);
-#endif
+    LOG(LiveConnect, "JavaJSObject::getSlot index = %ld", static_cast<long>(index));
 
     RootObject* rootObject = this->rootObject();
     if (!rootObject)
@@ -406,11 +394,7 @@ jobject JavaJSObject::getSlot(jint index) const
 
 void JavaJSObject::setSlot(jint index, jobject value) const
 {
-#ifdef __LP64__
-    JS_LOG ("index = %d, value = %p\n", index, value);
-#else
-    JS_LOG ("index = %ld, value = %p\n", index, value);
-#endif
+    LOG(LiveConnect, "JavaJSObject::setSlot index = %ld, value = %p", static_cast<long>(index), value);
 
     RootObject* rootObject = this->rootObject();
     if (!rootObject)
@@ -424,7 +408,7 @@ void JavaJSObject::setSlot(jint index, jobject value) const
 
 jstring JavaJSObject::toString() const
 {
-    JS_LOG ("\n");
+    LOG(LiveConnect, "JavaJSObject::toString");
     
     RootObject* rootObject = this->rootObject();
     if (!rootObject)
@@ -462,7 +446,7 @@ static PassRefPtr<RootObject> createRootObject(void* nativeHandle)
 // another JavaJSObject.
 jlong JavaJSObject::createNative(jlong nativeHandle)
 {
-    JS_LOG ("nativeHandle = %d\n", (int)nativeHandle);
+    LOG(LiveConnect, "JavaJSObject::createNative nativeHandle = %d", static_cast<int>(nativeHandle));
 
     if (nativeHandle == UndefinedHandle)
         return nativeHandle;
diff --git a/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp b/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
index 4e1b0d2..93bc01e 100644
--- a/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
@@ -30,22 +30,14 @@
 #if ENABLE(MAC_JAVA_BRIDGE)
 
 #include "JNIUtilityPrivate.h"
+#include "Logging.h"
 #include "runtime_array.h"
 #include "runtime_object.h"
 #include <runtime/Error.h>
 
-#ifdef NDEBUG
-#define JS_LOG(formatAndArgs...) ((void)0)
-#else
-#define JS_LOG(formatAndArgs...) { \
-    fprintf(stderr, "%s:%d -- %s:  ", __FILE__, __LINE__, __FUNCTION__); \
-    fprintf(stderr, formatAndArgs); \
-}
-#endif
-
 using namespace JSC;
 using namespace JSC::Bindings;
-
+using namespace WebCore;
 
 JavaField::JavaField(JNIEnv* env, jobject aField)
 {
@@ -155,7 +147,7 @@ JSValue JavaField::valueFromInstance(ExecState* exec, const Instance* i) const
         break;
     }
 
-    JS_LOG("getting %s = %s\n", UString(name()).UTF8String().c_str(), jsresult.toString(exec).ascii());
+    LOG(LiveConnect, "JavaField::valueFromInstance getting %s = %s", UString(name()).UTF8String().c_str(), jsresult.toString(exec).ascii());
 
     return jsresult;
 }
@@ -191,7 +183,7 @@ void JavaField::setValueToInstance(ExecState* exec, const Instance* i, JSValue a
     const JavaInstance* instance = static_cast<const JavaInstance*>(i);
     jvalue javaValue = convertValueToJValue(exec, aValue, m_JNIType, type());
 
-    JS_LOG("setting value %s to %s\n", UString(name()).UTF8String().c_str(), aValue.toString(exec).ascii());
+    LOG(LiveConnect, "JavaField::setValueToInstance setting value %s to %s", UString(name()).UTF8String().c_str(), aValue.toString(exec).ascii());
 
     switch (m_JNIType) {
     case array_type:
diff --git a/WebCore/bridge/jni/jsc/JavaClassJSC.cpp b/WebCore/bridge/jni/jsc/JavaClassJSC.cpp
index ec5c172..e1b8b4c 100644
--- a/WebCore/bridge/jni/jsc/JavaClassJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JavaClassJSC.cpp
@@ -40,7 +40,7 @@ JavaClass::JavaClass(jobject anInstance)
     jobject aClass = callJNIMethod<jobject>(anInstance, "getClass", "()Ljava/lang/Class;");
 
     if (!aClass) {
-        fprintf(stderr, "%s:  unable to call getClass on instance %p\n", __PRETTY_FUNCTION__, anInstance);
+        LOG_ERROR("Unable to call getClass on instance %p", anInstance);
         m_name = fastStrDup("<Unknown>");
         return;
     }
diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
index b42456c..db1b89a 100644
--- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
@@ -32,27 +32,16 @@
 #include "JNIUtility.h"
 #include "JNIUtilityPrivate.h"
 #include "JavaClassJSC.h"
+#include "Logging.h"
 #include "runtime_object.h"
 #include "runtime_root.h"
 #include <runtime/ArgList.h>
 #include <runtime/Error.h>
 #include <runtime/JSLock.h>
 
-#if PLATFORM(ANDROID)
-#include <assert.h>
-#endif
-
-#ifdef NDEBUG
-#define JS_LOG(formatAndArgs...) ((void)0)
-#else
-#define JS_LOG(formatAndArgs...) { \
-    fprintf(stderr, "%s:%d -- %s:  ", __FILE__, __LINE__, __FUNCTION__); \
-    fprintf(stderr, formatAndArgs); \
-}
-#endif
-
 using namespace JSC::Bindings;
 using namespace JSC;
+using namespace WebCore;
 
 JavaInstance::JavaInstance(jobject instance, PassRefPtr<RootObject> rootObject)
     : Instance(rootObject)
@@ -136,12 +125,12 @@ JSValue JavaInstance::invokeMethod(ExecState* exec, const MethodList& methodList
         }
     }
     if (!method) {
-        JS_LOG("unable to find an appropiate method\n");
+        LOG(LiveConnect, "JavaInstance::invokeMethod unable to find an appropiate method");
         return jsUndefined();
     }
 
     const JavaMethod* jMethod = static_cast<const JavaMethod*>(method);
-    JS_LOG("call %s %s on %p\n", UString(jMethod->name()).UTF8String().c_str(), jMethod->signature(), m_instance->m_instance);
+    LOG(LiveConnect, "JavaInstance::invokeMethod call %s %s on %p", UString(jMethod->name()).UTF8String().c_str(), jMethod->signature(), m_instance->m_instance);
 
     if (count > 0)
         jArgs = (jvalue*)malloc(count * sizeof(jvalue));
@@ -151,7 +140,7 @@ JSValue JavaInstance::invokeMethod(ExecState* exec, const MethodList& methodList
     for (i = 0; i < count; i++) {
         JavaParameter* aParameter = jMethod->parameterAt(i);
         jArgs[i] = convertValueToJValue(exec, args.at(i), aParameter->getJNIType(), aParameter->type());
-        JS_LOG("arg[%d] = %s\n", i, args.at(i).toString(exec).ascii());
+        LOG(LiveConnect, "JavaInstance::invokeMethod arg[%d] = %s", i, args.at(i).toString(exec).ascii());
     }
 
     jvalue result;
@@ -323,7 +312,7 @@ JSValue JavaInstance::valueOf(ExecState* exec) const
 JObjectWrapper::JObjectWrapper(jobject instance)
     : m_refCount(0)
 {
-    assert(instance);
+    ASSERT(instance);
 
     // Cache the JNIEnv used to get the global ref for this java instance.
     // It'll be used to delete the reference.
@@ -331,15 +320,15 @@ JObjectWrapper::JObjectWrapper(jobject instance)
 
     m_instance = m_env->NewGlobalRef(instance);
 
-    JS_LOG("new global ref %p for %p\n", m_instance, instance);
+    LOG(LiveConnect, "JObjectWrapper ctor new global ref %p for %p", m_instance, instance);
 
-    if  (!m_instance)
-        fprintf(stderr, "%s:  could not get GlobalRef for %p\n", __PRETTY_FUNCTION__, instance);
+    if (!m_instance)
+        LOG_ERROR("Could not get GlobalRef for %p", instance);
 }
 
 JObjectWrapper::~JObjectWrapper()
 {
-    JS_LOG("deleting global ref %p\n", m_instance);
+    LOG(LiveConnect, "JObjectWrapper dtor deleting global ref %p", m_instance);
     m_env->DeleteGlobalRef(m_instance);
 }
 
diff --git a/WebCore/platform/Logging.cpp b/WebCore/platform/Logging.cpp
index 2358d41..92e11e3 100644
--- a/WebCore/platform/Logging.cpp
+++ b/WebCore/platform/Logging.cpp
@@ -38,7 +38,7 @@ WTFLogChannel LogPopupBlocking =     { 0x00000040, "WebCoreLogLevel", WTFLogChan
 
 WTFLogChannel LogEvents =            { 0x00000080, "WebCoreLogLevel", WTFLogChannelOff };
 WTFLogChannel LogEditing =           { 0x00000100, "WebCoreLogLevel", WTFLogChannelOff };
-WTFLogChannel LogTextConversion =    { 0x00000200, "WebCoreLogLevel", WTFLogChannelOff };
+WTFLogChannel LogLiveConnect =       { 0x00000200, "WebCoreLogLevel", WTFLogChannelOff };
 
 WTFLogChannel LogIconDatabase =      { 0x00000400, "WebCoreLogLevel", WTFLogChannelOff };
 WTFLogChannel LogSQLDatabase =       { 0x00000800, "WebCoreLogLevel", WTFLogChannelOff };
@@ -123,8 +123,8 @@ WTFLogChannel* getChannelFromName(const String& channelName)
     if (equalIgnoringCase(channelName, String("StorageAPI")))
         return &LogStorageAPI;
 
-    if (equalIgnoringCase(channelName, String("TextConversion")))
-        return &LogTextConversion;
+    if (equalIgnoringCase(channelName, String("LiveConnect")))
+        return &LogLiveConnect;
 
     if (equalIgnoringCase(channelName, String("Threading")))
         return &LogThreading;
diff --git a/WebCore/platform/Logging.h b/WebCore/platform/Logging.h
index a3dfe62..c0c41c1 100644
--- a/WebCore/platform/Logging.h
+++ b/WebCore/platform/Logging.h
@@ -42,7 +42,7 @@ namespace WebCore {
     extern WTFLogChannel LogPopupBlocking;
     extern WTFLogChannel LogEvents;
     extern WTFLogChannel LogEditing;
-    extern WTFLogChannel LogTextConversion;
+    extern WTFLogChannel LogLiveConnect;
     extern WTFLogChannel LogIconDatabase;
     extern WTFLogChannel LogSQLDatabase;
     extern WTFLogChannel LogSpellingAndGrammar;
diff --git a/WebCore/platform/mac/LoggingMac.mm b/WebCore/platform/mac/LoggingMac.mm
index d3ba4d7..3e83579 100644
--- a/WebCore/platform/mac/LoggingMac.mm
+++ b/WebCore/platform/mac/LoggingMac.mm
@@ -54,7 +54,7 @@ void InitializeLoggingChannelsIfNecessary()
     initializeWithUserDefault(LogPopupBlocking);
     initializeWithUserDefault(LogEvents);
     initializeWithUserDefault(LogEditing);
-    initializeWithUserDefault(LogTextConversion);
+    initializeWithUserDefault(LogLiveConnect);
     initializeWithUserDefault(LogIconDatabase);
     initializeWithUserDefault(LogSQLDatabase);
     initializeWithUserDefault(LogSpellingAndGrammar);
diff --git a/WebCore/platform/text/gtk/TextCodecGtk.cpp b/WebCore/platform/text/gtk/TextCodecGtk.cpp
index 31da3b7..80ea077 100644
--- a/WebCore/platform/text/gtk/TextCodecGtk.cpp
+++ b/WebCore/platform/text/gtk/TextCodecGtk.cpp
@@ -254,18 +254,14 @@ void TextCodecGtk::registerEncodingNames(EncodingNameRegistrar registrar, bool e
         const char *canonicalName;
         canonicalName = (*codecAliases)[codecCount];
 
-        if(!isEncodingAvailable(canonicalName)) {
-            LOG(TextConversion, "Canonical encoding %s not available, skipping.", canonicalName);
+        if (!isEncodingAvailable(canonicalName))
             continue;
-        }
         registrar(canonicalName, canonicalName);
 
         const char *currentAlias;
         while ((currentAlias = (*codecAliases)[++codecCount])) {
-            if (isEncodingAvailable(currentAlias)) {
-                LOG(TextConversion, "Registering encoding name alias %s to canonical %s", currentAlias, canonicalName);
+            if (isEncodingAvailable(currentAlias))
                 registrar(currentAlias, canonicalName);
-            }
         }
 
     }
diff --git a/WebCore/platform/win/LoggingWin.cpp b/WebCore/platform/win/LoggingWin.cpp
index bdf9e1f..fe237e5 100644
--- a/WebCore/platform/win/LoggingWin.cpp
+++ b/WebCore/platform/win/LoggingWin.cpp
@@ -80,7 +80,7 @@ void InitializeLoggingChannelsIfNecessary()
     initializeWithUserDefault(LogPopupBlocking);
     initializeWithUserDefault(LogEvents);
     initializeWithUserDefault(LogEditing);
-    initializeWithUserDefault(LogTextConversion);
+    initializeWithUserDefault(LogLiveConnect);
     initializeWithUserDefault(LogIconDatabase);
     initializeWithUserDefault(LogSQLDatabase);
     initializeWithUserDefault(LogSpellingAndGrammar);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list