Changeset 210 for trunk


Ignore:
Timestamp:
Dec 14, 2010, 1:47:10 PM (15 years ago)
Author:
dmik
Message:

hotspot: Make sure JVM_GetLastErrorString()'s own debug statements don't hide actual last error messages in debug builds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/hotspot/src/share/vm/prims/jvm.cpp

    r2 r210  
    595595// Error message support //////////////////////////////////////////////////////
    596596
     597// JVM_GetLastErrorString is special: it should return the platform last error
     598// message which may get changed by NoHandleMark methods due to platform API
     599// calls but the original error message seems to be more useful than marking
     600// with NoHandleMark here, so temporarily disable it. Affects only debug builds.
     601// TODO: Maybe drop JVM_LEAF at all and use the plain function def instead?
     602#ifdef ASSERT
     603# undef debug_only
     604# define debug_only(x)
     605#endif
     606
    597607JVM_LEAF(jint, JVM_GetLastErrorString(char *buf, int len))
    598608  JVMWrapper("JVM_GetLastErrorString");
     
    600610JVM_END
    601611
     612#ifdef ASSERT
     613# undef debug_only
     614# define debug_only(x) x
     615#endif
    602616
    603617// java.io.File ///////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.