harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r477847 - in /harmony/enhanced/drlvm/trunk/vm/vmcore/src: class_support/classloader.cpp jni/jni.cpp
Date Tue, 21 Nov 2006 19:51:46 GMT
Author: gshimansky
Date: Tue Nov 21 11:51:45 2006
New Revision: 477847

URL: http://svn.apache.org/viewvc?view=rev&rev=477847
Log:
Fixed tracing which crashes on class name NULL. In this case DefineClass
should figure out the name from the supplied byte array


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp?view=diff&rev=477847&r1=477846&r2=477847
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp Tue Nov 21 11:51:45
2006
@@ -223,7 +223,7 @@
 {
     const String *className;
 
-    LOG2("classloader.defineclass", "Defining class " << class_name << " with
loader " << this);
+    LOG2("classloader.defineclass", "Defining class " << (NULL != class_name ? class_name
: "NULL") << " with loader " << this);
     if(class_name) {
         className = env->string_pool.lookup(class_name);
     } else {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp?view=diff&rev=477847&r1=477846&r2=477847
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp Tue Nov 21 11:51:45 2006
@@ -559,7 +559,7 @@
                            const jbyte *buf,
                            jsize len)
 {
-    TRACE2("jni", "DefineClass called, name = " << name);
+    TRACE2("jni", "DefineClass called, name = " << (NULL != name ? name : "NULL"));
     assert(hythread_is_suspend_enabled());
     Global_Env* env = VM_Global_State::loader_env;
     ClassLoader* cl;
@@ -634,7 +634,10 @@
 
     bool ld_result;
     if(clss != NULL)
+    {
+        TRACE2("jni", "Class defined successfully, name = " << res_name->bytes);
         ld_result = clss->verify(env) && clss->prepare(env);
+    }
 
     if(clss && ld_result)
     {



Mime
View raw message