# HG changeset patch # User coleenp # Date 1259769589 28800 # Node ID 0018cf203583bdfdaa0d2d4873e204b63428ffd1 # Parent 4b966d9946a3a171a135f4e90a632292075af54f# Parent 6400f475effea5ad14a70b450c9503311f75545e Merge diff -r 6400f475effe -r 0018cf203583 src/share/vm/classfile/vmSymbols.hpp --- a/src/share/vm/classfile/vmSymbols.hpp Tue Dec 01 14:49:41 2009 -0800 +++ b/src/share/vm/classfile/vmSymbols.hpp Wed Dec 02 07:59:49 2009 -0800 @@ -104,6 +104,7 @@ template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \ template(sun_jkernel_DownloadManager, "sun/jkernel/DownloadManager") \ template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \ + template(setBootClassLoaderHook_name, "setBootClassLoaderHook") \ \ /* class file format tags */ \ template(tag_source_file, "SourceFile") \ diff -r 6400f475effe -r 0018cf203583 src/share/vm/runtime/thread.cpp --- a/src/share/vm/runtime/thread.cpp Tue Dec 01 14:49:41 2009 -0800 +++ b/src/share/vm/runtime/thread.cpp Wed Dec 02 07:59:49 2009 -0800 @@ -884,6 +884,22 @@ vmSymbolHandles::void_method_signature(), CHECK); } +#ifdef KERNEL +static void set_jkernel_boot_classloader_hook(TRAPS) { + klassOop k = SystemDictionary::sun_jkernel_DownloadManager_klass(); + instanceKlassHandle klass (THREAD, k); + + if (k == NULL) { + // sun.jkernel.DownloadManager may not present in the JDK; just return + return; + } + + JavaValue result(T_VOID); + JavaCalls::call_static(&result, klass, vmSymbolHandles::setBootClassLoaderHook_name(), + vmSymbolHandles::void_method_signature(), CHECK); +} +#endif // KERNEL + static void reset_vm_info_property(TRAPS) { // the vm info string ResourceMark rm(THREAD); @@ -3102,6 +3118,12 @@ vm_exit_during_initialization(Handle(THREAD, PENDING_EXCEPTION)); } +#ifdef KERNEL + if (JDK_Version::is_gte_jdk17x_version()) { + set_jkernel_boot_classloader_hook(THREAD); + } +#endif // KERNEL + #ifndef SERIALGC // Support for ConcurrentMarkSweep. This should be cleaned up // and better encapsulated. The ugly nested if test would go away