Mercurial > hg > release > icedtea6-1.9
changeset 1355:514ec9ce7cae
Merge.
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Mon, 26 Jan 2009 23:12:40 +0000 |
parents | 050b48f42fb3 (current diff) 86cc7eb0035f (diff) |
children | 8e91de51da9e |
files | ChangeLog Makefile.am configure.ac patches/icedtea-visualvm.patch pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java rt/net/sourceforge/jnlp/tools/CertVerifier.java visualvm.desktop |
diffstat | 76 files changed, 1348 insertions(+), 873 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Mon Jan 26 23:09:32 2009 +0000 +++ b/.hgtags Mon Jan 26 23:12:40 2009 +0000 @@ -10,3 +10,5 @@ 871b70407a139c6bd42c200762ee1d302b31168f icedtea6-1.2 3ef9c9c4e70b8204b73fa9b88243f49f59c2a23f icedtea6-1.3 be368b1e3c7dca9b4dfe8e8f40be794ecfbef22e icedtea6-1.3.1 +6c02b699206db299c6bc96d97d31808bf84f042a icedtea6-1.4pre +2b1c03c1e9fa88e453da2ca774dc8900227a2e16 icedtea6-1.4
--- a/ChangeLog Mon Jan 26 23:09:32 2009 +0000 +++ b/ChangeLog Mon Jan 26 23:12:40 2009 +0000 @@ -30,6 +30,281 @@ (Net.c): Patch to new version with new functions. (nio_util.h): Add RESTARTABLE macro. +2009-01-26 Lillian Angel <langel@redhat.com> + + * configure.ac: Updated to pre-1.5 version. + +2009-01-26 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp + (JavaThread::has_special_condition_for_native_trans): New method. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: + (CppInterpreter::native_entry): Correctly handle safepoints + during post-call thread state transition. + +2009-01-22 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: + (CppInterpreter::native_entry): Correctly handle asynchronous + exceptions during post-call thread state transition. + +2009-01-22 Omair Majid <omajid@redhat.com> + Ioana Ivan <iivan@redhat.com> + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java + (start): Return silently if already started. + (stop): Return silently if already stopped. + +2009-01-22 Deepak Bhole <dbhole@redhat.com> + + * plugin/icedtea/sun/applet/PluginAppletSecurityContext.java: Use + Hashtable to store classloaders, instead of HashMap (values cannot be + null in HashTable). + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Catch CFE in + addition to CNFE. + +2009-01-22 Andrew Haley <aph@redhat.com> + + * ports/hotspot/src/cpu/zero/vm/stack_zero.hpp (class + ZeroFrame::FrameType): Set ENTRY_FRAME = 0xCAFEBABE. + + * ports/hotspot/src/share/vm/shark/shark_globals.hpp (SHARK_FLAGS): + Add SharkPrintAsmOf. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Add comment. + + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Set builder()->sharkEntry. + Use fnmatch() instead of strcmp(). + Generate debugging dumps. + * ports/hotspot/src/share/vm/shark/sharkEntry.hpp + (SharkEntry::code_start, code_limit): Rewrite. + (SharkEntry::setBounds): New. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::pointer_constant): New function. + * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp + (SharkBytecodeTracer::decode_one_word): + use SharkBuilder::pointer_constant. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::sharkEntry): New. + (SharkBuilder::CreateUnimplemented): use SharkBuilder::pointer_constant. + (SharkBuilder::CreateShouldNotReachHere): Likewise. + (MyJITMemoryManager::endFunctionBody): New method. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::check_zero): use SharkBuilder::pointer_constant. + (SharkBlock::check_bounds): Likewise. + (SharkBlock::add_safepoint): Likewise. + (SharkBlock::do_new): Likewise. + (SharkBlock::do_monitorexit): Don't check for null monitor. + + * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Add + llvm/ExecutionEngine/JITMemoryManager.h, + llvm/Support/CommandLine.h. + * ports/hotspot/src/share/vm/includeDB_shark (sharkBuilder.hpp): + add sharkEntry.hpp. + +2009-01-22 Lillian Angel <langel@redhat.com> + + * NEWS: Updated for release candidate. + +2009-01-22 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/cpu/zero/vm/frame_zero.hpp: Updated copyright year. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise. + +2009-01-22 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp + (print_zero_threads): New debug function. + +2009-01-22 Gary Benson <gbenson@redhat.com> + + * patches/icedtea-cc-interp-jvmti.patch: Reenable thread signalling. + +2009-01-21 Omair Majid <omajid@redhat.com> + + * patches/icedtea-awt-window-size.patch: Update patch. + +2009-01-21 Omair Majid <omajid@redhat.com> + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java: + Remove unused variables volume and muted. + (PulseAudioClip): Remove variable volume. + (open): Remove muteControl, volume and muted. + (native_setVolume): Rename to native_set_volume. + (native_update_volume): New function. + (isMuted): Remove. + (setMuted): Remove. + (setVolume): Rename to setCachedVolume. + (getVolume): Rename to getCachedVolume. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java: + Remove file. Mute relied on chaning the volume only through the api. That + assumption is invalid as the user can change volume through pulseaudio's + controls. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java + (isMuted): Remove. + (setMuted): Remove. + (native_setVolume): Rename to native_set_volume. + (native_update_volume): New function. + (getVolume): Rename to getCachedVolume. + (setVolume): Rename to setCachedVolume. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java: + Remove muted and muteControl. Rename volume to cachedVolume. + (PulseAudioPort): Remove muteControl. + (isMuted): Remove function. + (setMuted): Remove. + (native_setVolume): Rename to native_set_volume. + (native_updateVolumeInfo): Rename to native_update_volume. + (setVolume): Rename to setCachedVolume. + (getVolume): Rename to getCachedVolume. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: + Remove muteControl, muted and volume. + (open): Remove muteControl. + (native_setVolume): Rename to native_set_volume. + (native_update_volume): New function. + (isMuted): Remove. + (setMuted): Remove. + (getVolume): Rename to getCachedVolume. + (setVolume): Rename to setCachedVolume. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java + (native_setVolume): Rename to native_set_volume. + (native_updateVolumeInfo): Rename to native_update_volume. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java + (native_setVolume): Rename to native_set_volume. + (native_updateVolumeInfo): Rename to native_update_volume. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java + (setValue): Dont check for mute. + (getValue): Query pulseaudio for any change in volume. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java: + New variable cachedVolume. + (native_setVolume): Rename to native_set_volume. + (native_update_volume): New function. + (getCachedVolume): New function. + (setCachedVolume): New function. + (update_channels_and_volume): New function. + * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c + (sink_input_volume_change_complete): Remove. + (sink_input_change_volume): Remove. + (Java_org_classpath_icedtea_pulseaudio_EventLoop_native_1set_1sink_1volume): + Remove. + * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c + (Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_native_1updateVolumeInfo): + Rename to + Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_native_1update_1volume. + (Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_native_1setVolume): + Rename to + Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_native_1set_1volume. + * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c + (Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetPort_native_1updateVolumeInfo): + Rename to + Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetPort_native_1update_1volume. + (Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetPort_native_1setVolume): + Rename to + Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetPort_native_1set_1volume. + * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1setVolume): Rename + to Java_org_classpath_icedtea_pulseaudio_Stream_native_1set_1volume. + (get_sink_input_volume_callback): New function. + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1update_1volume): New + function. + + * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java + (testSupportedControls): Update to not check for MuteControl. + * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineRawTest.java + (testVolumeAndMute): Rename to testVolume. Remove test for MuteControl. + * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java + (testVolumeAndMute): Likewise. + (testSupportedControls): Update to not check for MuteControl. + * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourcePortTest.java + (testControls): Update to not check for MuteControl. + * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetPortTest.java + (testControls): Likewise. + +2009-01-21 Lillian Angel <langel@redhat.com> + + * plugin/icedtea/sun/applet/AppletSecurityContextManager.java: Added + copyright header. + * plugin/icedtea/sun/applet/PluginAppletViewer.java: Likewise. + * plugin/icedtea/sun/applet/PluginCallRequestFactory.java: Likewise. + * plugin/icedtea/sun/applet/PluginClassLoader.java: Likewise. + * plugin/icedtea/sun/applet/PluginDebug.java: Likewise. + * plugin/icedtea/sun/applet/PluginException.java: Likewise. + * plugin/icedtea/sun/applet/PluginMain.java: Likewise. + * plugin/icedtea/sun/applet/PluginMessageConsumer.java: Likewise. + * plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java: Likewise. + * plugin/icedtea/sun/applet/PluginStreamHandler.java: Likewise. + * plugin/icedtea/sun/applet/RequestQueue.java: Likewise. + +2009-01-21 Lillian Angel <langel@redhat.com> + + * rt/net/sourceforge/jnlp/security/CertVerifier.java: Fixed file name + in GPL header. + * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Likewise. + +2009-01-20 Lillian Angel <langel@redhat.com> + + * rt/net/sourceforge/jnlp/DefaultLaunchHandler.java: Removed debug + lines. + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Likewise. + * rt/net/sourceforge/jnlp/security/AccessWarningPane.java: Updated + imports. + * rt/net/sourceforge/jnlp/security/AppletWarningPane.java: Updated + imports. + * rt/net/sourceforge/jnlp/security/CertWarningPane.java: Updated + imports, added certVerifier global variable. + (CertWarningPane): Initialized certVerifier. + (installComponents): Added checks to determine if certificate is for + an https site, and set the name/publisher/from variables + appropriately. Also, customized warning pane label for https site. + * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: + (getDetails): Implemented. + (addToDetails): Likewise. + (R): Likewise. + (getPublisher): Likewise. + (getRoot): Likewise. + (getRootInCacerts): Likewise. + (hasSigningIssues): Likewise. + (noSigningIssues): Likewise. + * rt/net/sourceforge/jnlp/security/MoreInfoPane.java: Fixed imports. + * rt/net/sourceforge/jnlp/security/SecurityDialogUI.java: Fixed + imports. + * rt/net/sourceforge/jnlp/security/SecurityWarningDialog.java: Fixed + imports. + * rt/net/sourceforge/jnlp/security/SingleCertInfoPane.java: Fixed + imports. + * rt/net/sourceforge/jnlp/security/viewer/CertificatePane.java: Fixed + imports. + * rt/net/sourceforge/jnlp/tools/KeyTool.java: Removed debug lines. + * rt/net/sourceforge/jnlp/security/CertVerifier.java: Moved file + below, here. + * rt/net/sourceforge/jnlp/tools/CertVerifier.java: Removed. + * rt/net/sourceforge/jnlp/security/VariableX509TrustManager.java: + Removed debug lines. + +2009-01-20 Lillian Angel <langel@redhat.com> + + * HACKING: Removed visualvm patch. + * INSTALL: Updated to remove visualvm notes. + * Makefile.am: Removed building of netbeans and visualvm. + * README: Updated to remove visualvm notes. + * acinclude.m4: Removed options for netbeans and visualvm. + * configure.ac: Likewise. + * patches/icedtea-visualvm.patch: Removed. + * visualvm.desktop: Removed. + +2009-01-20 Matthias Klose <doko@ubuntu.com> + Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.[ch]pp (i486): Rename + to x86. + * ports/hotspot/src/cpu/zero/vm/frame_zero.hpp (fp): Remove PRODUCT + conditional, make the not-PRODUCT bit the default. + 2009-01-19 Andrew John Hughes <ahughes@redhat.com> * overlays/nio2/openjdk/jdk/src/share/classes/org/classpath/icedtea/misc/JavaNetGetIndexAccess.java:
--- a/HACKING Mon Jan 26 23:09:32 2009 +0000 +++ b/HACKING Mon Jan 26 23:12:40 2009 +0000 @@ -54,7 +54,6 @@ * icedtea-tools.patch: Remove DebugHelperHelper and add sources in make/java/awt/Makefile to fix build of jvmti. * icedtea-use-system-tzdata.patch: Use timezone data from the system (PR70/S6593486). * icedtea-version.patch: Replace name and bug URL with IcedTea versions. -* icedtea-visualvm.patch: Patches sources to build with platform8 and profiler3 instead of platform7 and profiler2. * icedtea-webservices.patch: Add applet support. * icedtea-zero-build.patch: Add support for the zero assembler build. * icedtea-shark-build.patch: Add support for building the Shark JIT.
--- a/INSTALL Mon Jan 26 23:09:32 2009 +0000 +++ b/INSTALL Mon Jan 26 23:12:40 2009 +0000 @@ -31,10 +31,6 @@ zlib-devel rhino (can be disabled using --without-rhino) -For building VisualVM, you will need: -netbeans (harness, platform8, apisupport1, java2, ide9) -jakarta-commons-logging - For building the PulseAudio based mixer, you will need pulseaudio-libs-devel >= 0.9.11 pulseaudio >= 0.9.11
--- a/Makefile.am Mon Jan 26 23:09:32 2009 +0000 +++ b/Makefile.am Mon Jan 26 23:12:40 2009 +0000 @@ -5,10 +5,6 @@ CACAO_VERSION = 0.99.3 CACAO_MD5SUM = 80de3ad344c1a20c086ec5f1390bd1b8 -NETBEANS_BASIC_CLUSTER = a7ea855f475fa3a982f094a45c155ab4 -NETBEANS_PROFILER_MD5SUM = ff8e8abc42df6c6749e6b02bcf7bb0a5 -VISUALVM_MD5SUM = 4b55bc623418818793392bb233da2927 - if ENABLE_GCJWEBPLUGIN GCJWEBPLUGIN_CLEAN = clean-gcjwebplugin GCJWEBPLUGIN_TARGET = gcjwebplugin.so @@ -41,12 +37,6 @@ PULSE_JAVA_CLASS_DIR = endif -if WITH_VISUALVM -VISUALVM_PATCH = patches/icedtea-visualvm.patch -else -VISUALVM_PATCH = -endif - if WITH_ALT_HSBUILD HOTSPOT_MAKE_DIR = make else @@ -78,8 +68,6 @@ endif endif rm -rf cacao - rm -rf visualvm - rm -rf netbeans rm -f jni-common.o install: @@ -93,13 +81,13 @@ clean-tools-jar clean-shared-objects \ clean-copy clean-hotspot-tools clean-rt $(GCJWEBPLUGIN_CLEAN) \ $(ICEDTEAPLUGIN_CLEAN) hotspot hotspot-helper clean-extra \ - clean-jtreg clean-jtreg-reports clean-visualvm clean-nbplatform + clean-jtreg clean-jtreg-reports EXTRA_DIST = rt generated \ patches/* \ gcjwebplugin.cc tools-copy contrib ports \ extra overlays \ - javaws.png javaws.desktop visualvm.desktop \ + javaws.png javaws.desktop \ jconsole.desktop policytool.desktop \ test/jtreg \ IcedTeaPlugin.cc \ @@ -316,30 +304,6 @@ CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz endif -NETBEANS_BASIC_CLUSTER_URL = http://nbi.netbeans.org/files/documents/210/2056/ - -if USE_ALT_NETBEANS_BASIC_CLUSTER_SRC_ZIP - NETBEANS_BASIC_CLUSTER_SRC_ZIP = $(ALT_NETBEANS_BASIC_CLUSTER_SRC_ZIP) -else - NETBEANS_BASIC_CLUSTER_SRC_ZIP = netbeans-6.1-200805300101-basic_cluster-src.zip -endif - -NETBEANS_PROFILER_URL = http://icedtea.classpath.org/visualvm/ - -if USE_ALT_NETBEANS_PROFILER_SRC_ZIP - NETBEANS_PROFILER_SRC_ZIP = $(ALT_NETBEANS_PROFILER_SRC_ZIP) -else - NETBEANS_PROFILER_SRC_ZIP = netbeans-profiler-visualvm_preview2.tar.gz -endif - -VISUALVM_URL = http://icedtea.classpath.org/visualvm/ - -if USE_ALT_VISUALVM_SRC_ZIP - VISUALVM_SRC_ZIP = $(ALT_VISUALVM_SRC_ZIP) -else - VISUALVM_SRC_ZIP = visualvm-20081031-src.tar.gz -endif - stamps/hgforest.stamp: if OPENJDK_SRC_DIR_FOUND else @@ -417,46 +381,6 @@ endif endif endif -if WITH_VISUALVM -if USE_ALT_NETBEANS_BASIC_CLUSTER_SRC_ZIP -else - if ! echo "$(NETBEANS_BASIC_CLUSTER_MD5SUM) $(NETBEANS_BASIC_CLUSTER_SRC_ZIP)" \ - | $(MD5SUM) --check ; \ - then \ - if [ $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) ] ; \ - then \ - mv $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) $(NETBEANS_BASIC_CLUSTER_SRC_ZIP).old ; \ - fi ; \ - $(WGET) $(NETBEANS_BASIC_CLUSTER_URL)$(NETBEANS_BASIC_CLUSTER_SRC_ZIP) \ - -O $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) ; \ - fi -endif -if USE_ALT_NETBEANS_PROFILER_SRC_ZIP -else - if ! echo "$(NETBEANS_PROFILER_MD5SUM) $(NETBEANS_PROFILER_SRC_ZIP)" \ - | $(MD5SUM) --check ; \ - then \ - if [ $(NETBEANS_PROFILER_SRC_ZIP) ] ; \ - then \ - mv $(NETBEANS_PROFILER_SRC_ZIP) $(NETBEANS_PROFILER_SRC_ZIP).old ; \ - fi ; \ - $(WGET) $(NETBEANS_PROFILER_URL)$(NETBEANS_PROFILER_SRC_ZIP) \ - -O $(NETBEANS_PROFILER_SRC_ZIP) ; \ - fi -endif -if USE_ALT_VISUALVM_SRC_ZIP -else - if ! echo "$(VISUALVM_MD5SUM) $(VISUALVM_SRC_ZIP)" \ - | $(MD5SUM) --check ; \ - then \ - if [ $(VISUALVM_SRC_ZIP) ] ; \ - then \ - mv $(VISUALVM_SRC_ZIP) $(VISUALVM_SRC_ZIP).old ; \ - fi ; \ - $(WGET) $(VISUALVM_URL)$(VISUALVM_SRC_ZIP) -O $(VISUALVM_SRC_ZIP) ; \ - fi -endif -endif mkdir -p stamps touch stamps/download.stamp @@ -469,11 +393,6 @@ if WITH_CACAO rm -f $(CACAO_SRC_ZIP) endif -if WITH_VISUALVM - rm -f $(VISUALVM_SRC_ZIP) - rm -f $(NETBEANS_PROFILER_SRC_ZIP) - rm -rf $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) -endif # Link ports sources into tree stamps/ports.stamp: stamps/extract.stamp @@ -629,7 +548,6 @@ patches/icedtea-arch.patch \ patches/icedtea-lc_ctype.patch \ patches/icedtea-messageutils.patch \ - $(VISUALVM_PATCH) \ patches/icedtea-javac-debuginfo.patch \ patches/icedtea-xjc.patch \ patches/icedtea-renderer-crossing.patch \ @@ -736,27 +654,6 @@ fi endif endif -if WITH_VISUALVM - if ! test -d visualvm ; \ - then \ - $(TAR) xf $(VISUALVM_SRC_ZIP) ; \ - fi - if ! test -d netbeans ; \ - then \ - mkdir netbeans ; \ - $(TAR) xf $(NETBEANS_PROFILER_SRC_ZIP) -C netbeans ; \ - $(UNZIP) -q $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) nbbuild/* -d netbeans/ ; \ - mv netbeans/profiler/ netbeans/profiler.cvs/ ; \ - $(UNZIP) -q $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) \ - api.java/* api.progress/* apisupport.harness/* editor.mimelookup/* \ - o.jdesktop.layout/* openide.actions/* openide.awt/* \ - openide.dialogs/* openide.execution/* openide.explorer/* \ - openide.filesystems/* openide.io/* openide.loaders/* \ - openide.modules/* openide.nodes/* openide.text/* openide.util/* \ - openide.windows/* options.api/* projectapi/* queries/* java.platform/* \ - -d netbeans/ ; \ - fi -endif if [ ! -e $(abs_top_builddir)/generated ]; then \ cp -a $(abs_top_srcdir)/generated $(abs_top_builddir); \ find $(abs_top_builddir)/generated -type f -exec chmod 640 '{}' ';' \ @@ -1126,7 +1023,7 @@ stamps/hotspot-tools.stamp stamps/plugs.stamp \ stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \ $(GCJWEBPLUGIN_TARGET) $(ICEDTEAPLUGIN_TARGET) \ - extra-lib/about.jar stamps/cacao.stamp stamps/visualvm.stamp \ + extra-lib/about.jar stamps/cacao.stamp \ stamps/pulse-java.stamp $(ARCH_PREFIX) $(MAKE) \ $(ICEDTEA_ENV) \ @@ -1155,26 +1052,6 @@ cp -pPRf pulse-java.jar \ $(BUILD_OUTPUT_DIR)/j2re-image/lib/ext endif -if WITH_VISUALVM - mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ - mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \ - sed "s/APPNAME=\`basename.*\`/APPNAME=visualvm/" \ - visualvm/visualvm/launcher/visualvm >> \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \ - chmod a+x $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \ - cp visualvm/visualvm/launcher/visualvm.conf \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ - echo visualvm >> \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \ - echo profiler3 >> \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \ - cp -r visualvm/visualvm/build/cluster/* \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \ - cp -r netbeans/nbbuild/netbeans/platform8 \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm ; \ - cp -r netbeans/nbbuild/netbeans/profiler3 \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm -endif cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/about.jnlp \ extra-lib/about.jar \ $(BUILD_OUTPUT_DIR)/j2re-image/lib ; \ @@ -1218,26 +1095,6 @@ cp -pPRf pulse-java.jar \ $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/ext endif -if WITH_VISUALVM - mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ - mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \ - sed "s/APPNAME=\`basename.*\`/APPNAME=visualvm/" \ - visualvm/visualvm/launcher/visualvm >> \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \ - chmod a+x $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \ - cp visualvm/visualvm/launcher/visualvm.conf \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ - echo visualvm >> \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \ - echo profiler3 >> \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \ - cp -r visualvm/visualvm/build/cluster/* \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \ - cp -r netbeans/nbbuild/netbeans/platform8 \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm ; \ - cp -r netbeans/nbbuild/netbeans/profiler3 \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm -endif cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/default.jnlp \ extra-lib/about.jar \ $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib ; \ @@ -1811,64 +1668,6 @@ dist-openjdk-fsg: stamps/patch-fsg.stamp $(ZIP) -r openjdk-fsg-$(OPENJDK_VERSION) openjdk/ -# VisualVM - -stamps/visualvm.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) stamps/download.stamp \ - stamps/extract.stamp stamps/nbplatform.stamp -if WITH_VISUALVM - cd visualvm/visualvm ; \ - ln -s $(abs_top_srcdir)/netbeans/nbbuild/netbeans . ; \ - rm netbeans/profiler3 && mv netbeans/extra netbeans/profiler3 ; \ - JAVA_HOME=$(ICEDTEA_HOME) $(ANT) build -endif - mkdir -p stamps - touch $@ - -clean-visualvm: - rm -rf visualvm - rm -f stamps/visualvm.stamp - -# Netbeans platform and profiler - -stamps/nbplatform.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) stamps/extract.stamp \ - stamps/download.stamp -if WITH_VISUALVM - cd netbeans ; \ - ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/libs/jfluid/ lib.profiler ; \ - ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/libs/common/ lib.profiler.common ; \ - ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/libs/jfluid-ui/ lib.profiler.ui ; \ - ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/modules/nbmodule/ profiler.nbmodule ; \ - mkdir -p ./nbbuild/netbeans/ ; \ - ln -s $(SYSTEM_NETBEANS_DIR)/platform8/ ./nbbuild/netbeans/platform8 ; \ - ln -s $(SYSTEM_NETBEANS_DIR)/apisupport1/ ./nbbuild/netbeans/apisupport1 ; \ - ln -s $(SYSTEM_NETBEANS_DIR)/harness/ ./nbbuild/netbeans/harness ; \ - ln -s $(SYSTEM_NETBEANS_DIR)/java2/ ./nbbuild/netbeans/java2 ; \ - ln -s $(SYSTEM_NETBEANS_DIR)/ide9/ ./nbbuild/netbeans/ide9 ; \ - cd profiler.cvs/libs/jfluid/native/build ; \ - if ! ($(ARCH_PREFIX) uname -a | grep x86_64) ; then \ - buildscript=./buildnative-linux-15.sh ; \ - else \ - buildscript=./buildnative-linux64-15.sh ; \ - fi ; \ - JAVA_HOME_15=$(ICEDTEA_HOME) JAVA_HOME_16=$(ICEDTEA_HOME) \ - $$buildscript ; \ - cd ../../../../.. ; \ - ln -s $(abs_top_srcdir)/netbeans/nbbuild/netbeans/extra nbbuild/netbeans/profiler3 ; \ - ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/modules/main/ profiler ; \ - for dir in jfluid jfluid-ui common ; do \ - JAVA_HOME=$(ICEDTEA_HOME) $(ANT) -Dpermit.jdk6.builds=true \ - -f profiler.cvs/libs/$$dir/build.xml ; \ - done ; \ - JAVA_HOME=$(ICEDTEA_HOME) $(ANT) -Dpermit.jdk6.builds=true \ - -f profiler.cvs/modules/main/build.xml ; -endif - mkdir -p stamps - touch $@ - -clean-nbplatform: - rm -rf netbeans - rm -f stamps/nbplatform.stamp - # Target Aliases # =============== @@ -1882,10 +1681,6 @@ cacao: stamps/cacao.stamp -visualvm: stamps/visualvm.stamp - -nbplatform: stamps/nbplatform.stamp - copy-source-files: stamps/copy-source-files.stamp download: stamps/download.stamp
--- a/NEWS Mon Jan 26 23:09:32 2009 +0000 +++ b/NEWS Mon Jan 26 23:12:40 2009 +0000 @@ -1,6 +1,12 @@ New in release 1.4 (NOT_YET_RELEASED) -- Integrated b13 drop fixes. +- Updated to b14 build. +- Upgraded to new Hotspot 14 from 12. +- XRender pipeline support: Java2D are noticably faster and running over a + remote X connection now feels like it is all local. +- Plugin now supports HTTPS sites. +- Many other Plugin, Zero, Shark and PulseAudio bug fixes. +- Build clean up. New in release 1.3.1 (2008-10-27)
--- a/README Mon Jan 26 23:09:32 2009 +0000 +++ b/README Mon Jan 26 23:12:40 2009 +0000 @@ -147,20 +147,6 @@ The environment variable CACAO_CONFIGURE_ARGS can be used to pass additional arguments to the cacao configure. -VisualVM -======== - -Passing --enable-visualvm to configure will build the VisualVM profiling -and troubleshooting tool. NetBeans profiler3 (visualvm_preview2) is -built from source before building VisualVM. NetBeans 6.1 must be installed -on the system. A binary launcher jvisualvm is placed in the -openjdk/control/build/arch/j2sdk-image/bin directory after the jdk is built. -Other useful VisualVM configure options include --with-visualvm-src-zip, -and --with-netbeans-profiler-src-zip which can be used to prevent -re-downloading of the source zips. --with-netbeans-home can be used to specify -where the Netbeans tools are installed (default /usr/share/netbeans). - - PulseAudio Mixer ================
--- a/acinclude.m4 Mon Jan 26 23:09:32 2009 +0000 +++ b/acinclude.m4 Mon Jan 26 23:12:40 2009 +0000 @@ -445,57 +445,6 @@ AC_SUBST(ALT_OPENJDK_SRC_ZIP) ]) -AC_DEFUN([WITH_VISUALVM_SRC_ZIP], -[ - AC_MSG_CHECKING(for a VisualVM source zip) - AC_ARG_WITH([visualvm-src-zip], - [AS_HELP_STRING(--with-visualvm-src-zip, specify the location of the visualvm source zip)], - [ - ALT_VISUALVM_SRC_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_VISUALVM_SRC_ZIP, test x = x) - ], - [ - ALT_VISUALVM_SRC_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_VISUALVM_SRC_ZIP, test x != x) - ]) - AC_MSG_RESULT(${ALT_VISUALVM_SRC_ZIP}) - AC_SUBST(ALT_VISUALVM_SRC_ZIP) -]) - -AC_DEFUN([WITH_NETBEANS_PROFILER_SRC_ZIP], -[ - AC_MSG_CHECKING(for a NetBeans profiler source zip) - AC_ARG_WITH([netbeans-profiler-src-zip], - [AS_HELP_STRING(--with-netbeans-profiler-src-zip, specify the location of the netbeans profiler source zip)], - [ - ALT_NETBEANS_PROFILER_SRC_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_NETBEANS_PROFILER_SRC_ZIP, test x = x) - ], - [ - ALT_NETBEANS_PROFILER_SRC_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_NETBEANS_PROFILER_SRC_ZIP, test x != x) - ]) - AC_MSG_RESULT(${ALT_NETBEANS_PROFILER_SRC_ZIP}) - AC_SUBST(ALT_NETBEANS_PROFILER_SRC_ZIP) -]) - -AC_DEFUN([WITH_NETBEANS_BASIC_CLUSTER_SRC_ZIP], -[ - AC_MSG_CHECKING(for a NetBeans basic cluster source zip) - AC_ARG_WITH([netbeans-basic-cluster-src-zip], - [AS_HELP_STRING(--with-netbeans-basic-cluster-src-zip, specify the location of the netbeans basic cluster source zip)], - [ - ALT_NETBEANS_BASIC_CLUSTER_SRC_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_NETBEANS_BASIC_CLUSTER_SRC_ZIP, test x = x) - ], - [ - ALT_NETBEANS_BASIC_CLUSTER_SRC_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_NETBEANS_BASIC_CLUSTER_SRC_ZIP, test x != x) - ]) - AC_MSG_RESULT(${ALT_NETBEANS_BASIC_CLUSTER_SRC_ZIP}) - AC_SUBST(ALT_NETBEANS_BASIC_CLUSTER_SRC_ZIP) -]) - AC_DEFUN([WITH_ALT_JAR_BINARY], [ AC_MSG_CHECKING(for an alternate jar command) @@ -608,31 +557,6 @@ AC_SUBST(XERCES2_JAR) ]) -AC_DEFUN([FIND_NETBEANS], -[ - AC_ARG_WITH([netbeans], - [AS_HELP_STRING(--with-netbeans,specify location of netbeans)], - [ - if test -f "${withval}"; then - AC_MSG_CHECKING(netbeans) - NETBEANS="${withval}" - AC_MSG_RESULT(${withval}) - else - AC_PATH_PROG(NETBEANS, "${withval}") - fi - ], - [ - NETBEANS= - ]) - if test -z "${NETBEANS}"; then - AC_PATH_PROG(NETBEANS, "netbeans") - fi - if test -z "${NETBEANS}"; then - AC_MSG_ERROR("NetBeans was not found.") - fi - AC_SUBST(NETBEANS) -]) - AC_DEFUN([FIND_RHINO_JAR], [ AC_MSG_CHECKING(whether to include Javascript support via Rhino)
--- a/configure.ac Mon Jan 26 23:09:32 2009 +0000 +++ b/configure.ac Mon Jan 26 23:12:40 2009 +0000 @@ -1,4 +1,4 @@ -AC_INIT([icedtea6], [1.4], [distro-pkg-dev@openjdk.java.net]) +AC_INIT([icedtea6], [pre-1.5], [distro-pkg-dev@openjdk.java.net]) AM_INIT_AUTOMAKE([1.10 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) AC_CANONICAL_HOST @@ -73,24 +73,6 @@ AM_CONDITIONAL(WITH_OPENJDK, test "${with_openjdk}" = true) AC_MSG_RESULT(${with_openjdk}) -AC_MSG_CHECKING([for a NetBeans installation]) -AC_ARG_WITH([netbeans-home], - [AS_HELP_STRING([--with-netbeans-home], - [NetBeans home directory (default is /usr/share/netbeans)])], - [ - if test "x${withval}" = x - then - SYSTEM_NETBEANS_DIR=/usr/share/netbeans - else - SYSTEM_NETBEANS_DIR=${withval} - fi - ], - [ - SYSTEM_NETBEANS_DIR=/usr/share/netbeans - ]) -AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}]) -AC_SUBST(SYSTEM_NETBEANS_DIR) - AC_MSG_CHECKING(for Ant home directory) AC_ARG_WITH([ant-home], [AS_HELP_STRING([--with-ant-home], @@ -157,18 +139,6 @@ AM_CONDITIONAL([ENABLE_NIO2], [test x$ENABLE_NIO2 = xyes]) AC_MSG_RESULT(${ENABLE_NIO2}) -AC_MSG_CHECKING(whether to build VisualVM) -AC_ARG_ENABLE([visualvm], - [AS_HELP_STRING([--enable-visualvm], - [Enable compilation of visualvm.])], - [enable_visualvm="${enableval}"], [enable_visualvm="no"]) -AM_CONDITIONAL(WITH_VISUALVM, test "x${enable_visualvm}" = "xyes") - -if test "x${enable_visualvm}" = "xyes" -then - FIND_NETBEANS -fi - AC_MSG_CHECKING(how many parallel build jobs to execute) AC_ARG_WITH([parallel-jobs], [AS_HELP_STRING([--with-parallel-jobs], @@ -259,9 +229,6 @@ WITH_OPENJDK_SRC_ZIP WITH_HOTSPOT_SRC_ZIP WITH_OPENJDK_SRC_DIR -WITH_VISUALVM_SRC_ZIP -WITH_NETBEANS_PROFILER_SRC_ZIP -WITH_NETBEANS_BASIC_CLUSTER_SRC_ZIP WITH_ALT_JAR_BINARY AC_CHECK_ENABLE_CACAO AC_CHECK_WITH_CACAO_HOME
--- a/patches/icedtea-awt-window-size.patch Mon Jan 26 23:09:32 2009 +0000 +++ b/patches/icedtea-awt-window-size.patch Mon Jan 26 23:12:40 2009 +0000 @@ -6,9 +6,9 @@ Rectangle newBounds = constrainBounds(reqBounds.x, reqBounds.y, reqBounds.width, reqBounds.height); - newDimensions = new WindowDimensions(newBounds, newDimensions.getInsets(), newDimensions.isClientSizeSet()); + Insets insets = newDimensions.getInsets(); -+ Rectangle fixedBounds = new Rectangle(newBounds.x, newBounds.y, newBounds.width - insets.left - insets.right, ++ Rectangle clientBounds = new Rectangle(newBounds.x, newBounds.y, newBounds.width - insets.left - insets.right, + newBounds.height - insets.top - insets.bottom); -+ newDimensions = new WindowDimensions(fixedBounds, insets, newDimensions.isClientSizeSet()); ++ newDimensions = new WindowDimensions(newDimensions.isClientSizeSet() ? clientBounds : newBounds , insets, newDimensions.isClientSizeSet()); } XToolkit.awtLock(); try {
--- a/patches/icedtea-cc-interp-jvmti.patch Mon Jan 26 23:09:32 2009 +0000 +++ b/patches/icedtea-cc-interp-jvmti.patch Mon Jan 26 23:12:40 2009 +0000 @@ -1,16 +1,6 @@ --- openjdk/hotspot/src/share/vm/prims/jvmtiManageCapabilities.cpp 2008-12-24 12:01:18.000000000 +0000 +++ openjdk/hotspot/src/share/vm/prims/jvmtiManageCapabilities.cpp 2008-12-24 12:00:29.000000000 +0000 -@@ -84,7 +84,9 @@ - - memset(&jc, 0, sizeof(jc)); - jc.can_get_bytecodes = 1; -+#ifndef CC_INTERP - jc.can_signal_thread = 1; -+#endif // !CC_INTERP - jc.can_get_source_file_name = 1; - jc.can_get_line_numbers = 1; - jc.can_get_synthetic_attribute = 1; -@@ -115,8 +117,10 @@ +@@ -115,8 +115,10 @@ jvmtiCapabilities jc; memset(&jc, 0, sizeof(jc));
--- a/patches/icedtea-visualvm.patch Mon Jan 26 23:09:32 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ ---- pp 2008-10-31 11:24:42.000000000 -0400 -+++ visualvm/visualvm/jvm/nbproject/platform.properties 2008-10-31 11:24:48.000000000 -0400 -@@ -16,8 +16,8 @@ - org.openide.compat,\ - org.openide.util.enumerations - enabled.clusters=\ -- platform7,\ -- profiler2 -+ platform8,\ -+ profiler3 - nbjdk.active=default - nbplatform.active=NetBeans_Platform_Dev_(Build_200711261600) - suite.dir=${basedir} ---- pp2 2008-10-31 11:50:40.000000000 -0400 -+++ visualvm/visualvm/nbproject/platform.properties 2008-10-31 11:50:47.000000000 -0400 -@@ -14,8 +14,8 @@ - org.openide.compat,\ - org.openide.util.enumerations - enabled.clusters=\ -- platform7,\ -- profiler2 -+ platform8,\ -+ profiler3 - nbjdk.active=default - nbplatform.active=NetBeans_Platform_6.0.1_(Build_200801291616) - suite.dir=${basedir}
--- a/plugin/icedtea/sun/applet/AppletSecurityContextManager.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/AppletSecurityContextManager.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,41 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package sun.applet; import java.security.AccessControlContext;
--- a/plugin/icedtea/sun/applet/PluginAppletSecurityContext.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginAppletSecurityContext.java Mon Jan 26 23:12:40 2009 +0000 @@ -55,6 +55,7 @@ import java.security.ProtectionDomain; import java.util.ArrayList; import java.util.HashMap; +import java.util.Hashtable; import java.util.List; import net.sourceforge.jnlp.runtime.JNLPRuntime; @@ -224,7 +225,7 @@ public class PluginAppletSecurityContext { - public static HashMap<ClassLoader, String> classLoaders = new HashMap<ClassLoader, String>(); + public static Hashtable<ClassLoader, String> classLoaders = new Hashtable<ClassLoader, String>(); // FIXME: make private public PluginObjectStore store = new PluginObjectStore();
--- a/plugin/icedtea/sun/applet/PluginAppletViewer.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginAppletViewer.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,4 +1,41 @@ - /* +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +/* * Copyright 1995-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. *
--- a/plugin/icedtea/sun/applet/PluginCallRequestFactory.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginCallRequestFactory.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,41 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package sun.applet;
--- a/plugin/icedtea/sun/applet/PluginClassLoader.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginClassLoader.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,41 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package sun.applet; public class PluginClassLoader extends ClassLoader {
--- a/plugin/icedtea/sun/applet/PluginDebug.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginDebug.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,41 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package sun.applet; import java.io.*;
--- a/plugin/icedtea/sun/applet/PluginException.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginException.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,41 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package sun.applet;
--- a/plugin/icedtea/sun/applet/PluginMain.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginMain.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,40 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + /* * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--- a/plugin/icedtea/sun/applet/PluginMessageConsumer.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginMessageConsumer.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,41 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package sun.applet; import java.util.ArrayList;
--- a/plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,41 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package sun.applet;
--- a/plugin/icedtea/sun/applet/PluginStreamHandler.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginStreamHandler.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,41 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package sun.applet; import java.io.BufferedReader;
--- a/plugin/icedtea/sun/applet/RequestQueue.java Mon Jan 26 23:09:32 2009 +0000 +++ b/plugin/icedtea/sun/applet/RequestQueue.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,3 +1,41 @@ +/* VoidPluginCallRequest -- represent Java-to-JavaScript requests + Copyright (C) 2008 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package sun.applet; @@ -36,4 +74,4 @@ public int size() { return size; } -} \ No newline at end of file +}
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Jan 26 23:12:40 2009 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 2008, 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -292,15 +292,39 @@ // Set up the Java frame anchor thread->set_last_Java_frame(); - // Change the thread state to native + // Change the thread state to _thread_in_native ThreadStateTransition::transition_from_java(thread, _thread_in_native); // Make the call intptr_t result[4 - LogBytesPerWord]; ffi_call(handler->cif(), (void (*)()) function, result, arguments); - // Change the thread state back to Java - ThreadStateTransition::transition_from_native(thread, _thread_in_Java); + // Change the thread state back to _thread_in_Java. + // ThreadStateTransition::transition_from_native() cannot be used + // here because it does not check for asynchronous exceptions. + // We have to manage the transition ourself. + thread->set_thread_state(_thread_in_native_trans); + + // Make sure new state is visible in the GC thread + if (os::is_MP()) { + if (UseMembar) { + OrderAccess::fence(); + } + else { + InterfaceSupport::serialize_memory(thread); + } + } + + // Handle safepoint operations, pending suspend requests, + // and pending asynchronous exceptions. + if (SafepointSynchronize::do_call_back() || + thread->has_special_condition_for_native_trans()) { + JavaThread::check_special_condition_for_native_trans(thread); + CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops()); + } + + // Finally we can change the thread state to _thread_in_Java. + thread->set_thread_state(_thread_in_Java); fixup_after_potential_safepoint(); // Clear the frame anchor
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 2008, 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,11 +41,7 @@ // accessors for the instance variables intptr_t* fp() const { -#ifdef PRODUCT - ShouldNotCallThis(); -#else - return (intptr_t *) -1; // make frame::print_value_on work -#endif // !PRODUCT + return (intptr_t *) -1; } #ifdef CC_INTERP
--- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,13 +37,13 @@ { intptr_t *lo_addr = thread->zero_stack()->sp(); if (!lo_addr) { - _st->print(" stack not set up"); + _st->print_cr(" stack not set up"); return; } intptr_t *hi_addr = (intptr_t *) thread->top_zero_frame(); if (!hi_addr) { - _st->print("no frames pushed"); + _st->print_cr("no frames pushed"); return; } assert(hi_addr >= lo_addr, "corrupted stack"); @@ -250,3 +250,24 @@ _st->print_cr(PTR_FORMAT, *addr); } }; + +#ifndef PRODUCT +extern "C" { + void print_zero_threads() { + char buf[O_BUFLEN]; + ZeroStackPrinter zsp(tty, buf, sizeof(buf)); + + for (JavaThread *t = Threads::first(); t; t = t->next()) { + tty->print(PTR_FORMAT, t); + tty->print(" "); + t->print_on_error(tty, buf, sizeof(buf)); + tty->cr(); + tty->cr(); + + zsp.print(t); + if (t->next()) + tty->cr(); + } + } +} +#endif // !PRODUCT
--- a/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -142,7 +142,7 @@ }; enum FrameType { - ENTRY_FRAME = 1, + ENTRY_FRAME = 0xCAFEBABE, INTERPRETER_FRAME, SHARK_FRAME, DEOPTIMIZER_FRAME
--- a/ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.cpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.cpp Mon Jan 26 23:12:40 2009 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,5 +27,5 @@ #include "incls/_stubRoutines_zero.cpp.incl" #ifdef IA32 -address StubRoutines::i486::_call_stub_compiled_return = NULL; +address StubRoutines::x86::_call_stub_compiled_return = NULL; #endif // IA32
--- a/ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 2008, 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ }; // them if that happens. #ifdef IA32 - class i486 + class x86 { friend class VMStructs;
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -95,6 +95,15 @@ } public: + // Check for pending suspend requests and pending asynchronous + // exceptions. There are separate accessors for these, but + // _suspend_flags is volatile so using them would be unsafe. + bool has_special_condition_for_native_trans() + { + return _suspend_flags != 0; + } + + public: bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava)
--- a/ports/hotspot/src/share/vm/includeDB_shark Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/includeDB_shark Mon Jan 26 23:12:40 2009 +0000 @@ -112,6 +112,7 @@ sharkBuilder.hpp sizes.hpp sharkBuilder.hpp sharkType.hpp sharkBuilder.hpp sharkValue.inline.hpp +sharkBuilder.hpp sharkEntry.hpp sharkBytecodeTracer.cpp sharkBytecodeTracer.hpp sharkBytecodeTracer.cpp sharkState.inline.hpp @@ -269,3 +270,4 @@ sharkValue.inline.hpp ciType.hpp sharkValue.inline.hpp llvmHeaders.hpp sharkValue.inline.hpp sharkValue.hpp +
--- a/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -36,6 +36,10 @@ #include <llvm/ModuleProvider.h> #include <llvm/Support/IRBuilder.h> #include <llvm/Type.h> +#include <llvm/ExecutionEngine/JITMemoryManager.h> +#include <llvm/Support/CommandLine.h> + +#include <map> #ifdef assert #undef assert
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Mon Jan 26 23:12:40 2009 +0000 @@ -1,6 +1,6 @@ /* * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -992,7 +992,7 @@ if (value->is_jobject()) { call_vm_nocheck( SharkRuntime::throw_NullPointerException(), - LLVMValue::intptr_constant((intptr_t) __FILE__), + builder()->pointer_constant(__FILE__), LLVMValue::jint_constant(__LINE__)); } else { @@ -1021,7 +1021,7 @@ SharkTrackingState *saved_state = current_state()->copy(); call_vm_nocheck( SharkRuntime::throw_ArrayIndexOutOfBoundsException(), - LLVMValue::intptr_constant((intptr_t) __FILE__), + builder()->pointer_constant(__FILE__), LLVMValue::jint_constant(__LINE__), index->jint_value()); handle_exception(function()->CreateGetPendingException()); @@ -1141,8 +1141,7 @@ Value *state = builder()->CreateLoad( builder()->CreateIntToPtr( - LLVMValue::intptr_constant( - (intptr_t) SafepointSynchronize::address_of_state()), + builder()->pointer_constant(SafepointSynchronize::address_of_state()), PointerType::getUnqual(SharkType::jint_type())), "state"); @@ -2238,13 +2237,13 @@ builder()->SetInsertPoint(heap_alloc); Value *top_addr = builder()->CreateIntToPtr( - LLVMValue::intptr_constant((intptr_t) Universe::heap()->top_addr()), + builder()->pointer_constant(Universe::heap()->top_addr()), PointerType::getUnqual(SharkType::intptr_type()), "top_addr"); Value *end = builder()->CreateLoad( builder()->CreateIntToPtr( - LLVMValue::intptr_constant((intptr_t) Universe::heap()->end_addr()), + builder()->pointer_constant(Universe::heap()->end_addr()), PointerType::getUnqual(SharkType::intptr_type())), "end"); @@ -2473,7 +2472,10 @@ void SharkBlock::do_monitorexit() { SharkValue *lockee = pop(); - check_null(lockee); + // The monitorexit can't throw an NPE because the verifier checks + // that the monitor operations are block structured before we + // compile. + // check_null(lockee); Value *object = lockee->jobject_value(); // Find the monitor associated with this object @@ -2513,5 +2515,8 @@ // Release the lock builder()->SetInsertPoint(got_monitor); monitor->release(this); - check_pending_exception(); + // The monitorexit can't throw an NPE because the verifier checks + // that the monitor operations are block structured before we + // compile. + // check_pending_exception(); }
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Mon Jan 26 23:12:40 2009 +0000 @@ -28,12 +28,15 @@ using namespace llvm; +std::map<const llvm::Function*, SharkEntry*> SharkBuilder::sharkEntry; + SharkBuilder::SharkBuilder() : IRBuilder<>(), _module("shark"), _module_provider(module()), - _execution_engine(ExecutionEngine::create(&_module_provider)) -{ + _execution_engine(ExecutionEngine::createJIT + (&_module_provider, NULL, new MyJITMemoryManager(), + /* Fast */ false)) { init_external_functions(); } @@ -152,7 +155,7 @@ { return CreateCall2( SharkRuntime::unimplemented(), - LLVMValue::intptr_constant((intptr_t) file), + pointer_constant(file), LLVMValue::jint_constant(line)); } @@ -160,7 +163,7 @@ { return CreateCall2( SharkRuntime::should_not_reach_here(), - LLVMValue::intptr_constant((intptr_t) file), + pointer_constant(file), LLVMValue::jint_constant(line)); } @@ -174,3 +177,16 @@ ConstantInt::get(Type::Int1Ty, 0)}; return CreateCall(llvm_memory_barrier_fn(), args, args + 5); } + +void SharkBuilder::MyJITMemoryManager::endFunctionBody + (const llvm::Function *F, unsigned char *FunctionStart, + unsigned char *FunctionEnd) +{ + mm->endFunctionBody(F, FunctionStart, FunctionEnd); +#ifndef PRODUCT + SharkEntry *e = sharkEntry[F]; + if (e) + e->setBounds(FunctionStart, FunctionEnd); +#endif // !PRODUCT +} +
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -27,11 +27,76 @@ public: SharkBuilder(); + static std::map<const llvm::Function*, SharkEntry*> sharkEntry; + private: llvm::Module _module; llvm::ExistingModuleProvider _module_provider; llvm::ExecutionEngine* _execution_engine; + // MyJITMemoryManager wraps the JIT Memory Manager: this allows us + // to run our own memory allocation policies, but the purpose here + // is to allow us to intercept JITMemoryManager::endFunctionBody. + class MyJITMemoryManager : public llvm::JITMemoryManager { + + llvm::JITMemoryManager *mm; + + public: + + MyJITMemoryManager() + { + mm = llvm::JITMemoryManager::CreateDefaultMemManager(); + } + + virtual void AllocateGOT() { + mm->AllocateGOT(); + } + + virtual unsigned char *getGOTBase() const { + return mm->getGOTBase(); + } + + virtual unsigned char *startFunctionBody(const llvm::Function *F, + uintptr_t &ActualSize) { + return mm->startFunctionBody(F, ActualSize); + } + + virtual unsigned char *allocateStub(const llvm::GlobalValue* F, + unsigned StubSize, + unsigned Alignment) { + return mm->allocateStub(F, StubSize, Alignment); + } + + void endFunctionBody(const llvm::Function *F, unsigned char *FunctionStart, + unsigned char *FunctionEnd); + + virtual void deallocateMemForFunction(const llvm::Function *F) { + return mm->deallocateMemForFunction(F); + } + + virtual unsigned char* startExceptionTable(const llvm::Function* F, + uintptr_t &ActualSize) { + return mm->startExceptionTable(F, ActualSize); + } + + virtual void endExceptionTable(const llvm::Function *F, + unsigned char *TableStart, + unsigned char *TableEnd, + unsigned char* FrameRegister) { + mm->endExceptionTable(F, TableStart, TableEnd, FrameRegister); + } + + virtual void setMemoryWritable() { + mm->setMemoryWritable(); + } + + virtual void setMemoryExecutable() { + mm->setMemoryExecutable(); + } + }; + + MyJITMemoryManager *MemMgr; + public: llvm::Module* module() { @@ -125,9 +190,37 @@ const llvm::FunctionType* sig, const char* name); + llvm::Constant* pointer_constant(const void *ptr) + { + // Create a pointer constant that points at PTR. We do this by + // creating a GlobalVariable mapped at PTR. This is a workaround + // for http://www.llvm.org/bugs/show_bug.cgi?id=2920 + + using namespace llvm; + + // This might be useful but it returns a const pointer that can't + // be used for anything. Go figure... +// { +// const GlobalValue *value +// = execution_engine()->getGlobalValueAtAddress(const_cast<void*>(ptr)); +// if (value) +// return ConstantExpr::getPtrToInt(value, SharkType::intptr_type()); +// } + + char name[128]; + snprintf(name, sizeof name - 1, "pointer_constant_%p", ptr); + + GlobalVariable *value = new GlobalVariable(SharkType::intptr_type(), + false, GlobalValue::ExternalLinkage, + NULL, name, module()); + execution_engine()->addGlobalMapping(value, const_cast<void*>(ptr)); + + return ConstantExpr::getPtrToInt(value, SharkType::intptr_type()); + } + // Helper for making pointers public: - llvm::Constant* make_pointer(intptr_t addr, const llvm::Type* type) const + llvm::Constant* make_pointer(intptr_t addr, const llvm::Type* type) { return llvm::ConstantExpr::getIntToPtr( LLVMValue::intptr_constant(addr), @@ -193,8 +286,7 @@ LLVMValue::jbyte_constant(CardTableModRefBS::dirty_card), CreateIntToPtr( CreateAdd( - LLVMValue::intptr_constant( - (intptr_t) ((CardTableModRefBS *) bs)->byte_map_base), + pointer_constant(((CardTableModRefBS *) bs)->byte_map_base), CreateLShr( CreatePtrToInt(field, SharkType::intptr_type()), LLVMValue::intptr_constant(CardTableModRefBS::card_shift))),
--- a/ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp Mon Jan 26 23:12:40 2009 +0000 @@ -89,7 +89,7 @@ break; case T_ADDRESS: - *dst = LLVMValue::intptr_constant(value->returnAddress_value()); + *dst = builder->pointer_constant((const void*)value->returnAddress_value()); break; default:
--- a/ports/hotspot/src/share/vm/shark/sharkEntry.cpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkEntry.cpp Mon Jan 26 23:12:40 2009 +0000 @@ -41,30 +41,6 @@ // Lots of the stuff down here is machine- and LLVM-specific. // It's only debug stuff though, and none of it's critical. -address SharkEntry::code_start() const -{ - return (address) entry_point(); -} - -address SharkEntry::code_limit() const -{ -#ifdef PPC - // LLVM seems to insert three junk instructions and a null after - // every function. Only the first junk instruction seems to be - // kept after the next function is generated, however, so this - // method will only work before you generate another function. - // I wish there was a nicer way to do this, but that's life... - uint32_t *limit = (uint32_t *) code_start(); - while (*limit) - limit++; - assert(limit[-1] == 0xd143cfec && limit[-2] == 0xd143cfec, "should be"); - limit -= 3; - return (address) limit; -#else - Unimplemented(); -#endif // PPC -} - void SharkEntry::print_pd_statistics(address start, address limit) const { #ifdef PPC
--- a/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -48,8 +48,24 @@ #ifndef PRODUCT private: - address code_start() const; - address code_limit() const; + address code_start() const + { + return start; + } + address code_limit() const + { + return limit; + } void print_pd_statistics(address start, address limit) const; + + address start, limit; + +public: + void setBounds(unsigned char *FunctionStart, unsigned char *FunctionEnd) + { + start = (address)FunctionStart; + limit = (address)FunctionEnd; + } + #endif // !PRODUCT };
--- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Mon Jan 26 23:12:40 2009 +0000 @@ -26,6 +26,8 @@ #include "incls/_precompiled.incl" #include "incls/_sharkFunction.cpp.incl" +#include <fnmatch.h> + using namespace llvm; void SharkFunction::initialize() @@ -37,6 +39,11 @@ // Create the function _function = builder()->CreateFunction(); entry->set_llvm_function(function()); +#ifndef PRODUCT + // FIXME: there should be a mutex when updating sharkEntry in case + // there are multiple compilation threads. + builder()->sharkEntry[function()] = entry; +#endif // !PRODUCT // Create the list of blocks set_block_insertion_point(NULL); @@ -122,10 +129,25 @@ // Dump the bitcode, if requested if (SharkPrintBitcodeOf != NULL) { - if (!strcmp(SharkPrintBitcodeOf, name())) + if (!fnmatch(SharkPrintBitcodeOf, name(), 0)) function()->dump(); } + if (SharkPrintAsmOf != NULL) { +#if defined (__x86_64) || defined (__i386) + std::vector<const char*> Args; + Args.push_back(""); // program name + if (!fnmatch(SharkPrintAsmOf, name(), 0)) + // Oh, yuck. The LLVM name for this debugging dump is + // target-specific. + Args.push_back("-debug-only=" "x86-emitter"); + else + Args.push_back("-debug-only="); + Args.push_back(0); // Null terminator. + cl::ParseCommandLineOptions(Args.size()-1, (char**)&Args[0]); +#endif + } + // Compile to native code void *code = builder()->execution_engine()->getPointerToFunction(function()); entry->set_entry_point((ZeroEntry::method_entry_t) code);
--- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -232,6 +232,8 @@ // OopMap support public: + // Every time a new, distinct pc is required, an extra byte is + // emitted into the codebuffer int code_offset() const { int offset = masm()->offset();
--- a/ports/hotspot/src/share/vm/shark/shark_globals.hpp Mon Jan 26 23:09:32 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/shark_globals.hpp Mon Jan 26 23:12:40 2009 +0000 @@ -48,6 +48,9 @@ develop(ccstr, SharkPrintBitcodeOf, NULL, \ "Print the LLVM bitcode of the specified method") \ \ + develop(ccstr, SharkPrintAsmOf, NULL, \ + "Print the asm of the specified method") \ + \ develop(bool, SharkTraceBytecodes, false, \ "Trace bytecode compilation") \ \
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Mon Jan 26 23:12:40 2009 +0000 @@ -55,9 +55,6 @@ private byte[] data = null; - private boolean muted; - private float volume; - // these are frame indices. so counted from 0 // the current frame index private int currentFrame = 0; @@ -206,7 +203,6 @@ this.supportedFormats = formats; this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; - this.volume = PulseAudioVolumeControl.MAX_VOLUME; this.streamName = DEFAULT_CLIP_NAME; clipThread = new ClipThread(); @@ -416,12 +412,7 @@ PulseAudioVolumeControl volumeControl = new PulseAudioVolumeControl( this, eventLoop); - PulseAudioMuteControl muteControl = new PulseAudioMuteControl(this, - volumeControl); controls.add(volumeControl); - controls.add(muteControl); - volume = volumeControl.getValue(); - muted = muteControl.getValue(); PulseAudioMixer mixer = PulseAudioMixer.getInstance(); mixer.addSourceLine(this); @@ -433,28 +424,22 @@ // FIXME @Override - public byte[] native_setVolume(float value) { - return stream.native_setVolume(value); + public byte[] native_set_volume(float value) { + return stream.native_set_volume(value); } - @Override - public boolean isMuted() { - return muted; + public byte[] native_update_volume() { + return stream.native_update_volume(); } @Override - public void setMuted(boolean value) { - muted = value; + public float getCachedVolume() { + return stream.getCachedVolume(); } @Override - public float getVolume() { - return this.volume; - } - - @Override - public void setVolume(float value) { - this.volume = value; + public void setCachedVolume(float value) { + stream.setCachedVolume(value); } @@ -536,12 +521,8 @@ @Override public void start() { - if (!isOpen) { - throw new IllegalStateException("Line not open"); - } - if (isStarted) { - throw new IllegalStateException("already started"); + return; } super.start(); @@ -562,8 +543,9 @@ throw new IllegalStateException("Line not open"); } + /* do what start does and ignore if called at the wrong time */ if (!isStarted) { - throw new IllegalStateException("not started, so cant stop"); + return; } if (clipThread.isAlive()) {
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java Mon Jan 26 23:09:32 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* PulseAudioMuteControl.java - Copyright (C) 2008 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. - -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. - */ - -package org.classpath.icedtea.pulseaudio; - -import javax.sound.sampled.BooleanControl; - -final class PulseAudioMuteControl extends BooleanControl { - - private PulseAudioVolumeControl volumeControl; - private PulseAudioPlaybackLine line; - - protected PulseAudioMuteControl(PulseAudioPlaybackLine line, - PulseAudioVolumeControl volumeControl) { - super(BooleanControl.Type.MUTE, false, "Volume muted", "Volume on"); - this.volumeControl = volumeControl; - this.line = line; - } - - public synchronized void setValue(boolean value) { - if (!line.isOpen()) { - return; - } - - if (value == true) { - line.setMuted(true); - volumeControl.setStreamVolume(0); - } else { - line.setMuted(false); - float newValue = volumeControl.getValue(); - volumeControl.setStreamVolume(newValue); - } - } - - public synchronized boolean getValue() { - return line.isMuted(); - } - -}
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java Mon Jan 26 23:12:40 2009 +0000 @@ -37,18 +37,49 @@ package org.classpath.icedtea.pulseaudio; +/** + * Represents a Line that supports changing the volume + */ interface PulseAudioPlaybackLine { - byte[] native_setVolume(float value); - - boolean isMuted(); + /** + * Set the volume of the Line (ie, sink input, source, or sink) + * + * @return an Operation object which can be used to check if the operation + * has completed + */ + byte[] native_set_volume(float value); - void setMuted(boolean mute); + /** + * + * Update the volume information of a Line (sink input, source or sink) + * + * @return an Operation object which can be used to check if the operation + * has been completed + */ + byte[] native_update_volume(); + + + /** + * Gets the cached volume. To get the current volume, call + * native_update_volume, and then call this method to get the updated + * volume. + * + * @return the cached volume of the Line + */ + float getCachedVolume(); - float getVolume(); + /** + * Set the cached value of a line + * + */ + void setCachedVolume(float volume); - void setVolume(float volume); - + /** + * Check if a line is open + * + * @return <code>true</code> if line is open + */ boolean isOpen(); }
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Mon Jan 26 23:12:40 2009 +0000 @@ -57,10 +57,8 @@ private EventLoop eventLoop; - private float volume; - private boolean muted; + private float cachedVolume; - private PulseAudioMuteControl muteControl; private PulseAudioVolumeControl volumeControl; static { @@ -76,72 +74,67 @@ volumeControl = new PulseAudioVolumeControl(this, eventLoop); controls.add(volumeControl); - muteControl = new PulseAudioMuteControl(this, volumeControl); - controls.add(muteControl); /* * unlike other lines, Ports must either be open or close * * close = no sound. open = sound - * */ open(); // System.out.println("Opened Target Port " + name); } - // FIXME why public @Override - public abstract byte[] native_setVolume(float newValue); + public abstract byte[] native_set_volume(float newValue); + /** + * + * @see {@link update_channels_and_volume} + */ // FIXME why public - public abstract byte[] native_updateVolumeInfo(); + public abstract byte[] native_update_volume(); @Override - public boolean isMuted() { - return muted; + public float getCachedVolume() { + return this.cachedVolume; } @Override - public void setMuted(boolean value) { - muted = value; - } - - @Override - public float getVolume() { - - // FIXME need to query system for volume - return this.volume; - } - - @Override - public void setVolume(float value) { - this.volume = value; + public void setCachedVolume(float value) { + this.cachedVolume = value; } - // FIXME - public synchronized void updateVolumeInfo() { + private void updateVolumeInfo() { Operation op; synchronized (eventLoop.threadLock) { - op = new Operation(native_updateVolumeInfo()); + op = new Operation(native_update_volume()); } op.waitForCompletion(); op.releaseReference(); } - // FIXME - public void update_channels_and_volume(int channels, float volume) { + /** + * Callback used by JNI when native_update_volume completes + * + * @param channels + * the number of channels + * @param cachedVolume + * the new volume + */ + @SuppressWarnings("unused") + void update_channels_and_volume(int channels, float volume) { this.channels = channels; - this.volume = volume; + this.cachedVolume = volume; } @Override public void close() { - native_setVolume((float) 0); + native_set_volume((float) 0); isOpen = false; fireLineEvent(new LineEvent(this, LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED)); @@ -155,7 +148,7 @@ if (isOpen) { return; } - native_setVolume(volume); + native_set_volume(cachedVolume); isOpen = true; fireLineEvent(new LineEvent(this, LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED));
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Jan 26 23:12:40 2009 +0000 @@ -51,10 +51,7 @@ public final class PulseAudioSourceDataLine extends PulseAudioDataLine implements SourceDataLine, PulseAudioPlaybackLine { - private PulseAudioMuteControl muteControl; private PulseAudioVolumeControl volumeControl; - private boolean muted; - private float volume; public static final String DEFAULT_SOURCEDATALINE_NAME = "Audio Stream"; @@ -67,7 +64,6 @@ this.lineListeners = new ArrayList<LineListener>(); this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; - this.volume = PulseAudioVolumeControl.MAX_VOLUME; this.streamName = DEFAULT_SOURCEDATALINE_NAME; } @@ -80,8 +76,6 @@ volumeControl = new PulseAudioVolumeControl(this, eventLoop); controls.add(volumeControl); - muteControl = new PulseAudioMuteControl(this, volumeControl); - controls.add(muteControl); PulseAudioMixer parentMixer = PulseAudioMixer.getInstance(); parentMixer.addSourceLine(this); @@ -97,32 +91,26 @@ } // FIXME - public byte[] native_setVolume(float value) { + public byte[] native_set_volume(float value) { synchronized (eventLoop.threadLock) { - return stream.native_setVolume(value); + return stream.native_set_volume(value); } } - // FIXME + public byte[] native_update_volume() { + synchronized (eventLoop.threadLock) { + return stream.native_update_volume(); + } + } + @Override - public boolean isMuted() { - return muted; + public float getCachedVolume() { + return stream.getCachedVolume(); } @Override - public void setMuted(boolean value) { - muted = value; - } - - @Override - public float getVolume() { - return this.volume; - } - - @Override - synchronized public void setVolume(float value) { - this.volume = value; - + synchronized public void setCachedVolume(float value) { + stream.setCachedVolume(value); } @Override
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Mon Jan 26 23:12:40 2009 +0000 @@ -82,10 +82,10 @@ } // FIXME - public native byte[] native_setVolume(float newValue); + public native byte[] native_set_volume(float newValue); // FIXME - public synchronized native byte[] native_updateVolumeInfo(); + public native byte[] native_update_volume(); @Override public Line.Info getLineInfo() {
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Mon Jan 26 23:12:40 2009 +0000 @@ -49,7 +49,6 @@ } PulseAudioTargetPort(String name) { - super(name); } @@ -75,12 +74,11 @@ super.close(); } - // FIXME - public native byte[] native_setVolume(float newValue); + public native byte[] native_set_volume(float newValue); // FIXME - public synchronized native byte[] native_updateVolumeInfo(); + public native byte[] native_update_volume(); @Override public Line.Info getLineInfo() {
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java Mon Jan 26 23:12:40 2009 +0000 @@ -46,8 +46,12 @@ protected PulseAudioVolumeControl(PulseAudioPlaybackLine line, EventLoop eventLoop) { + + /* + * the initial volume is ignored by pulseaudio. + */ super(FloatControl.Type.VOLUME, MIN_VOLUME, MAX_VOLUME, 1, -1, line - .getVolume(), "pulseaudio units", "Volume Off", + .getCachedVolume(), "pulseaudio units", "Volume Off", "Default Volume", "Full Volume"); this.line = line; this.eventLoop = eventLoop; @@ -66,17 +70,15 @@ return; } - if (!line.isMuted()) { - setStreamVolume(newValue); - } + setStreamVolume(newValue); - line.setVolume(newValue); + line.setCachedVolume(newValue); } protected synchronized void setStreamVolume(float newValue) { Operation op; synchronized (eventLoop.threadLock) { - op = new Operation(line.native_setVolume(newValue)); + op = new Operation(line.native_set_volume(newValue)); } op.waitForCompletion(); @@ -85,7 +87,15 @@ } public synchronized float getValue() { - return line.getVolume(); + Operation op; + synchronized (eventLoop.threadLock) { + op = new Operation(line.native_update_volume()); + } + + op.waitForCompletion(); + op.releaseReference(); + + return line.getCachedVolume(); } }
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java Mon Jan 26 23:12:40 2009 +0000 @@ -115,6 +115,7 @@ } private Format format; + private float cachedVolume; private List<StateListener> stateListeners; private List<WriteListener> writeListeners; @@ -222,7 +223,9 @@ private native byte[] native_pa_stream_update_sample_rate(int rate); - native byte[] native_setVolume(float newValue); + native byte[] native_set_volume(float newValue); + + native byte[] native_update_volume(); /* * pa_operation pa_stream_proplist_update (pa_streams, pa_update_mode_t @@ -777,4 +780,16 @@ native_pa_stream_unref(); } + float getCachedVolume() { + return this.cachedVolume; + } + + void setCachedVolume(float volume) { + this.cachedVolume = volume; + } + + void update_channels_and_volume(int channels, float volume) { + this.cachedVolume = volume; + } + }
--- a/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c Mon Jan 26 23:12:40 2009 +0000 @@ -295,69 +295,3 @@ } -static void sink_input_volume_change_complete(pa_context* contest, int success, - void* userdata) { - // userdata is the pointer to the int containing the new volume - - assert(userdata); - free(userdata); - assert(success); - -} - -static void sink_input_change_volume(pa_context* c, - const pa_sink_input_info* i, int eol, void* userdata) { - assert(c); - - if (eol) { - return; - } - - assert(i); - assert(userdata); - int volume = *((int*)userdata); - - int j = 0; - // printf("changing sink input volume\n"); - pa_cvolume* new_volume = malloc(sizeof(pa_cvolume)); - - // printf("allocated memory\n"); - new_volume->channels = i->volume.channels; - // printf("set the number of channels\n"); - for (j = 0; j < new_volume->channels; j++) { - new_volume->values[j] = volume; - } - - // printf("calling set_sick_input_volume\n"); - pa_operation* o = pa_context_set_sink_input_volume(c, i->index, new_volume, - sink_input_volume_change_complete, new_volume); - if (o != NULL) { - pa_operation_unref(o); - } - - // printf("done setup for changing volume\n"); -} - - -/* - * Class: org_classpath_icedtea_pulseaudio_EventLoop - * Method: native_set_sink_volume - * Signature: ([BI)V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_EventLoop_native_1set_1sink_1volume -(JNIEnv* env, jobject obj, jbyteArray streamPointer, jint volume) { - - pa_stream* stream = (pa_stream*) convertJavaPointerToNative(env, streamPointer); - assert(stream); - pa_context* context = (pa_context*) getJavaPointer(env, obj, "contextPointer"); - assert(context); - - int* new_volume = malloc(sizeof(int)); - *new_volume = volume; - - int stream_id = pa_stream_get_index(stream); - pa_operation* o = pa_context_get_sink_input_info(context, stream_id,sink_input_change_volume, new_volume); - pa_operation_unref(o); - return; -} -
--- a/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c Mon Jan 26 23:12:40 2009 +0000 @@ -22,7 +22,7 @@ assert(pulse_thread_env); if (eol == 0) { - // printf("%s\n", i->name); + // printf("%s\n", i->name); jobject obj = (jobject) userdata; assert(obj); jclass cls = (*pulse_thread_env)->GetObjectClass(pulse_thread_env, obj); @@ -39,10 +39,10 @@ /* * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourcePort - * Method: native_updateVolumeInfo + * Method: native_update_volume * Signature: ()[B */ -JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_native_1updateVolumeInfo +JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_native_1update_1volume (JNIEnv *env, jobject obj) { jclass cls = (*env)->GetObjectClass(env, obj); assert(cls); @@ -65,10 +65,10 @@ /* * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourcePort - * Method: native_setVolume + * Method: native_set_volume * Signature: (F)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_native_1setVolume +JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_native_1set_1volume (JNIEnv *env, jobject obj, jfloat value) { jclass cls = (*env)->GetObjectClass(env, obj); assert(cls);
--- a/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c Mon Jan 26 23:12:40 2009 +0000 @@ -11,17 +11,17 @@ extern JNIEnv* pulse_thread_env; -void sink_callback(pa_context *context, int success, void *userdata) { +static void sink_callback(pa_context *context, int success, void *userdata) { notifyWaitingOperations(pulse_thread_env); } -void get_sink_volume_callback(pa_context *context, const pa_sink_info *i, +static void get_sink_volume_callback(pa_context *context, const pa_sink_info *i, int eol, void *userdata) { assert(context); assert(pulse_thread_env); if (eol == 0) { - // printf("%s\n", i->name); + // printf("%s\n", i->name); jobject obj = (jobject) userdata; assert(obj); jclass cls = (*pulse_thread_env)->GetObjectClass(pulse_thread_env, obj); @@ -40,10 +40,10 @@ /* * Class: org_classpath_icedtea_pulseaudio_PulseAudioTargetPort - * Method: native_updateVolumeInfo + * Method: native_update_volume * Signature: ()[B */ -JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetPort_native_1updateVolumeInfo +JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetPort_native_1update_1volume (JNIEnv *env, jobject obj) { jclass cls = (*env)->GetObjectClass(env, obj); assert(cls); @@ -72,10 +72,10 @@ /* * Class: org_classpath_icedtea_pulseaudio_PulseAudioTargetPort - * Method: native_setVolume + * Method: native_set_volume * Signature: (F)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetPort_native_1setVolume +JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetPort_native_1set_1volume (JNIEnv *env, jobject obj, jfloat value) { jclass cls = (*env)->GetObjectClass(env, obj); assert(cls);
--- a/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Jan 26 23:12:40 2009 +0000 @@ -5,6 +5,7 @@ #include <string.h> #define STREAM_POINTER "streamPointer" +#define CONTEXT_POINTER "contextPointer" typedef struct java_context { JNIEnv* env; @@ -297,10 +298,10 @@ setJavaPointer(env, obj, "streamPointer", stream); /* - * - * The stream has been created; now setup the callbacks + * + * The stream has been created; now setup the callbacks * so we can do somethig about them - * + * */ pa_stream_set_state_callback (stream, stream_state_callback, j_context); @@ -966,12 +967,12 @@ /* * Class: org_classpath_icedtea_pulseaudio_Stream - * Method: native_setVolume + * Method: native_set_volume * Signature: (F)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1setVolume +JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1set_1volume (JNIEnv *env, jobject obj, jfloat new_volume) { - + pa_stream *stream = getJavaPointer(env, obj, STREAM_POINTER); assert(stream); pa_context *context = pa_stream_get_context(stream); @@ -988,6 +989,55 @@ } + +static void get_sink_input_volume_callback(pa_context *context, const pa_sink_input_info *i, + int eol, void *userdata) { + + JNIEnv* env = pulse_thread_env; + + assert(context); + assert(env); + jobject obj = (jobject) userdata; + assert(obj); + + if (eol == 0) { + jclass cls = (*pulse_thread_env)->GetObjectClass(pulse_thread_env, obj); + assert(cls); + jmethodID mid1 = (*pulse_thread_env)->GetMethodID(pulse_thread_env, cls, + "update_channels_and_volume", "(IF)V"); + assert(mid1); + (*pulse_thread_env)->CallVoidMethod(pulse_thread_env, obj, mid1, + (int) (i->volume).channels, (float) (i->volume).values[0]) ; + } else { + notifyWaitingOperations(pulse_thread_env); + (*env)->DeleteGlobalRef(env, obj); + } +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_update_volume + * Signature: ()[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1update_1volume +(JNIEnv* env, jobject obj) { + + pa_stream* stream = getJavaPointer(env, obj, STREAM_POINTER); + assert(stream); + + int sink_input_index = pa_stream_get_index(stream); + + pa_context* context = pa_stream_get_context(stream); + assert(context); + + obj = (*env)->NewGlobalRef(env, obj); + pa_operation *o = pa_context_get_sink_input_info(context, sink_input_index , get_sink_input_volume_callback, obj); + assert(o); + return convertNativePointerToJava(env, o); + + +} + JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_bytesInBuffer(JNIEnv *env, jobject obj) { pa_stream *stream = getJavaPointer(env, obj, STREAM_POINTER); assert(stream); @@ -1000,7 +1050,7 @@ JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1updateTimingInfo(JNIEnv* env, jobject obj) { pa_stream *stream = getJavaPointer(env, obj, STREAM_POINTER); assert(stream); - pa_operation* o = pa_stream_update_timing_info(stream, update_timing_info_callback, NULL); + pa_operation* o = pa_stream_update_timing_info(stream, update_timing_info_callback, NULL); assert(o); return convertNativePointerToJava(env, o);
--- a/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Mon Jan 26 23:12:40 2009 +0000 @@ -447,7 +447,7 @@ Control[] controls = clip.getControls(); Assert.assertNotNull(controls); - Assert.assertTrue(controls.length >= 2); + Assert.assertTrue(controls.length >= 1); for (Control control : controls) { Assert.assertNotNull(control); }
--- a/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineRawTest.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineRawTest.java Mon Jan 26 23:12:40 2009 +0000 @@ -43,7 +43,6 @@ import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; -import javax.sound.sampled.BooleanControl; import javax.sound.sampled.DataLine; import javax.sound.sampled.FloatControl; import javax.sound.sampled.Line; @@ -195,7 +194,7 @@ } @Test - public void testVolumeAndMute() throws Exception { + public void testVolume() throws Exception { Mixer selectedMixer = mixer; SourceDataLine line = (SourceDataLine) selectedMixer @@ -211,14 +210,9 @@ line.start(); PulseAudioVolumeControl volume = (PulseAudioVolumeControl) line .getControl(FloatControl.Type.VOLUME); - PulseAudioMuteControl mute = (PulseAudioMuteControl) line - .getControl(BooleanControl.Type.MUTE); - mute.setValue(true); volume.setValue(PulseAudioVolumeControl.MAX_VOLUME); - mute.setValue(false); - byte[] abData = new byte[1000]; int bytesRead = 0;
--- a/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java Mon Jan 26 23:12:40 2009 +0000 @@ -287,6 +287,7 @@ sourceDataLine.write(buffer, 1, buffer.length); } + // FIXME @Test public void testWriteWithoutStart() throws UnsupportedAudioFileException, IOException, LineUnavailableException, InterruptedException { @@ -805,13 +806,11 @@ sourceDataLine.open(); Assert.assertTrue(sourceDataLine .isControlSupported(FloatControl.Type.VOLUME)); - Assert.assertTrue(sourceDataLine - .isControlSupported(BooleanControl.Type.MUTE)); sourceDataLine.close(); } @Test - public void testVolumeAndMute() throws Exception { + public void testVolume() throws Exception { Mixer selectedMixer = mixer; sourceDataLine = (SourceDataLine) selectedMixer.getLine(new Line.Info( @@ -827,14 +826,9 @@ sourceDataLine.start(); FloatControl volume = (FloatControl) sourceDataLine .getControl(FloatControl.Type.VOLUME); - BooleanControl mute = (BooleanControl) sourceDataLine - .getControl(BooleanControl.Type.MUTE); - mute.setValue(true); volume.setValue(volume.getMaximum()); - mute.setValue(false); - byte[] abData = new byte[1000]; int bytesRead = 0;
--- a/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourcePortTest.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourcePortTest.java Mon Jan 26 23:12:40 2009 +0000 @@ -40,7 +40,6 @@ import static org.junit.Assert.assertNotNull; import javax.sound.sampled.AudioSystem; -import javax.sound.sampled.BooleanControl; import javax.sound.sampled.FloatControl; import javax.sound.sampled.Line; import javax.sound.sampled.LineUnavailableException; @@ -103,10 +102,6 @@ FloatControl volumeControl = (FloatControl) port .getControl(FloatControl.Type.VOLUME); volumeControl.setValue(60000); - BooleanControl muteControl = (BooleanControl) port - .getControl(BooleanControl.Type.MUTE); - muteControl.setValue(true); - muteControl.setValue(false); port.close(); } }
--- a/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetPortTest.java Mon Jan 26 23:09:32 2009 +0000 +++ b/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetPortTest.java Mon Jan 26 23:12:40 2009 +0000 @@ -40,7 +40,6 @@ import static org.junit.Assert.assertNotNull; import javax.sound.sampled.AudioSystem; -import javax.sound.sampled.BooleanControl; import javax.sound.sampled.FloatControl; import javax.sound.sampled.Line; import javax.sound.sampled.LineUnavailableException; @@ -103,10 +102,6 @@ FloatControl volumeControl = (FloatControl) port .getControl(FloatControl.Type.VOLUME); volumeControl.setValue(60000); - BooleanControl muteControl = (BooleanControl) port - .getControl(BooleanControl.Type.MUTE); - muteControl.setValue(true); - muteControl.setValue(false); port.close(); } }
--- a/rt/net/sourceforge/jnlp/DefaultLaunchHandler.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/DefaultLaunchHandler.java Mon Jan 26 23:12:40 2009 +0000 @@ -107,8 +107,6 @@ result.append(causes[i].getMessage()); result.append(")"); } - - System.out.println(result); } }
--- a/rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Jan 26 23:12:40 2009 +0000 @@ -745,7 +745,6 @@ try { u = tracker.getCacheURL(remoteURL); - System.out.println("URL = " + u); } catch (Exception e) { throw new ClassNotFoundException(name); } @@ -776,6 +775,7 @@ return loaders[i].findClass(name); } catch(ClassNotFoundException ex) { } + catch(ClassFormatError cfe) {} } throw new ClassNotFoundException(name);
--- a/rt/net/sourceforge/jnlp/security/AccessWarningPane.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/AccessWarningPane.java Mon Jan 26 23:12:40 2009 +0000 @@ -58,7 +58,6 @@ import net.sourceforge.jnlp.JNLPFile; import net.sourceforge.jnlp.runtime.JNLPRuntime; -import net.sourceforge.jnlp.tools.CertVerifier; /** * Provides the look and feel for a SecurityWarningDialog. These dialogs are
--- a/rt/net/sourceforge/jnlp/security/AppletWarningPane.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/AppletWarningPane.java Mon Jan 26 23:12:40 2009 +0000 @@ -50,7 +50,6 @@ import javax.swing.JLabel; import javax.swing.JPanel; -import net.sourceforge.jnlp.tools.CertVerifier; public class AppletWarningPane extends SecurityDialogUI {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/net/sourceforge/jnlp/security/CertVerifier.java Mon Jan 26 23:12:40 2009 +0000 @@ -0,0 +1,92 @@ +/* CertVerifier.java + Copyright (C) 2009 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package net.sourceforge.jnlp.security; + +import java.security.cert.CertPath; +import java.security.cert.Certificate; +import java.util.ArrayList; + +/** + * An interface that provides various details about a certificate + */ + +public interface CertVerifier { + + /** + * Return if the publisher is already trusted + */ + public boolean getAlreadyTrustPublisher(); + + /** + * Return if the root is in CA certs + */ + public boolean getRootInCacerts(); + + /** + * Return if there are signing issues with the certificate(s) being veried + */ + public boolean hasSigningIssues(); + + /** + * Return if there are no signing issues with this cert (!hasSigningIssues()) + */ + public boolean noSigningIssues(); + + /** + * Get the details regarding issue(s) with this certificate + */ + public ArrayList<String> getDetails(); + + /** + * Return a valid certificate path to this certificate(s) being verified + * @return The CertPath + */ + public ArrayList<CertPath> getCerts(); + + /** + * Returns the application's publisher's certificate. + */ + public abstract Certificate getPublisher(); + + /** + * Returns the application's root's certificate. This + * may return the same certificate as getPublisher() in + * the event that the application is self signed. + */ + public abstract Certificate getRoot(); +}
--- a/rt/net/sourceforge/jnlp/security/CertWarningPane.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/CertWarningPane.java Mon Jan 26 23:12:40 2009 +0000 @@ -61,7 +61,6 @@ import net.sourceforge.jnlp.JNLPFile; import net.sourceforge.jnlp.PluginBridge; import net.sourceforge.jnlp.runtime.JNLPRuntime; -import net.sourceforge.jnlp.tools.CertVerifier; import net.sourceforge.jnlp.tools.KeyTool; /** @@ -75,9 +74,11 @@ public class CertWarningPane extends SecurityDialogUI { JCheckBox alwaysTrust; + CertVerifier certVerifier; public CertWarningPane(JComponent x, CertVerifier certVerifier) { super(x, certVerifier); + this.certVerifier = certVerifier; } /** @@ -88,7 +89,9 @@ ((SecurityWarningDialog)optionPane).getType(); JNLPFile file = ((SecurityWarningDialog)optionPane).getFile(); - + Certificate c = ((SecurityWarningDialog)optionPane) + .getJarSigner().getPublisher(); + String name = ""; String publisher = ""; String from = ""; @@ -96,7 +99,11 @@ //We don't worry about exceptions when trying to fill in //these strings -- we just want to fill in as many as possible. try { - if (file instanceof PluginBridge) + if ((certVerifier instanceof HttpsCertVerifier) && + (c instanceof X509Certificate)) + name = getCN(((X509Certificate)c) + .getSubjectX500Principal().getName()); + else if (file instanceof PluginBridge) name = file.getTitle(); else name = file.getInformation().getTitle(); @@ -104,8 +111,6 @@ } try { - Certificate c = ((SecurityWarningDialog)optionPane) - .getJarSigner().getPublisher(); if (c instanceof X509Certificate) { publisher = getCN(((X509Certificate)c) .getSubjectX500Principal().getName()); @@ -124,20 +129,27 @@ //Top label String topLabelText = ""; String propertyName = ""; - switch (type) { - case VERIFIED: - topLabelText = R("SSigVerified"); + if (certVerifier instanceof HttpsCertVerifier) + { + topLabelText = "The website's certificate cannot be verified. " + + "Do you want to continue?"; + propertyName = "OptionPane.warningIcon"; + } + else + switch (type) { + case VERIFIED: + topLabelText = R("SSigVerified"); propertyName = "OptionPane.informationIcon"; break; - case UNVERIFIED: + case UNVERIFIED: topLabelText = R("SSigUnverified"); propertyName = "OptionPane.warningIcon"; break; - case SIGNING_ERROR: + case SIGNING_ERROR: topLabelText = R("SSignatureError"); propertyName = "OptionPane.warningIcon"; break; - } + } ImageIcon icon = new ImageIcon((new sun.misc.Launcher()) .getClassLoader().getResource("net/sourceforge/jnlp/resources/warning.png")); JLabel topLabel = new JLabel(htmlWrap(topLabelText), icon, SwingConstants.LEFT); @@ -164,7 +176,10 @@ JPanel infoPanel = new JPanel(new GridLayout(4,1)); infoPanel.add(nameLabel); infoPanel.add(publisherLabel); - infoPanel.add(fromLabel); + + if (!(certVerifier instanceof HttpsCertVerifier)) + infoPanel.add(fromLabel); + infoPanel.add(alwaysTrust); infoPanel.setBorder(BorderFactory.createEmptyBorder(25,25,25,25));
--- a/rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java Mon Jan 26 23:12:40 2009 +0000 @@ -1,4 +1,4 @@ -/* VariableX509TrustManager.java +/* HttpsCertVerifier.java Copyright (C) 2009 Red Hat, Inc. This file is part of IcedTea. @@ -41,16 +41,20 @@ import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; +import java.security.cert.CertificateNotYetValidException; +import java.security.cert.CertificateExpiredException; import java.security.cert.X509Certificate; import java.util.ArrayList; -import net.sourceforge.jnlp.tools.CertVerifier; - +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.tools.KeyTool; + public class HttpsCertVerifier implements CertVerifier { private VariableX509TrustManager tm; private X509Certificate[] chain; private String authType; + private ArrayList<String> details = new ArrayList<String>(); public HttpsCertVerifier(VariableX509TrustManager tm, X509Certificate[] chain, String authType) { this.tm = tm; @@ -87,32 +91,84 @@ } public ArrayList<String> getDetails() { - // TODO Auto-generated method stub - return new ArrayList<String>(); + boolean hasExpiredCert=false; + boolean hasExpiringCert=false; + boolean notYetValidCert=false; + boolean isUntrusted=false; + + if (! getAlreadyTrustPublisher()) + isUntrusted = true; + + for (int i=0; i < chain.length; i++) + { + X509Certificate cert = chain[i]; + + long now = System.currentTimeMillis(); + long SIX_MONTHS = 180*24*60*60*1000L; + long notAfter = cert.getNotAfter().getTime(); + if (notAfter < now) { + hasExpiredCert = true; + } else if (notAfter < now + SIX_MONTHS) { + hasExpiringCert = true; + } + + try { + cert.checkValidity(); + } catch (CertificateNotYetValidException cnyve) { + notYetValidCert = true; + } catch (CertificateExpiredException cee) { + hasExpiredCert = true; + } + } + + if (isUntrusted || hasExpiredCert || hasExpiringCert || notYetValidCert) { + if (isUntrusted) + addToDetails(R("SUntrustedCertificate")); + if (hasExpiredCert) + addToDetails(R("SHasExpiredCert")); + if (hasExpiringCert) + addToDetails(R("SHasExpiringCert")); + if (notYetValidCert) + addToDetails(R("SNotYetValidCert")); + } + return details; + } + + private void addToDetails(String detail) { + if (!details.contains(detail)) + details.add(detail); + } + + private static String R(String key) { + return JNLPRuntime.getMessage(key); } public Certificate getPublisher() { - // TODO Auto-generated method stub - return null; + if (chain.length > 0) + return (Certificate)chain[0]; + return null; } public Certificate getRoot() { - // TODO Auto-generated method stub - return null; + if (chain.length > 0) + return (Certificate)chain[chain.length - 1]; + return null; } public boolean getRootInCacerts() { - // TODO Auto-generated method stub - return false; + try { + KeyTool kt = new KeyTool(); + return kt.checkCacertsForCertificate(getRoot()); + } catch (Exception e) { + } + return false; } public boolean hasSigningIssues() { - // TODO Auto-generated method stub return false; } public boolean noSigningIssues() { - // TODO Auto-generated method stub return false; }
--- a/rt/net/sourceforge/jnlp/security/MoreInfoPane.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/MoreInfoPane.java Mon Jan 26 23:12:40 2009 +0000 @@ -53,7 +53,6 @@ import javax.swing.SwingConstants; import net.sourceforge.jnlp.runtime.JNLPRuntime; -import net.sourceforge.jnlp.tools.CertVerifier; /** * Provides the UI for the More Info dialog. This dialog shows details about an
--- a/rt/net/sourceforge/jnlp/security/SecurityDialogUI.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/SecurityDialogUI.java Mon Jan 26 23:12:40 2009 +0000 @@ -54,7 +54,6 @@ import javax.swing.plaf.OptionPaneUI; import net.sourceforge.jnlp.runtime.JNLPRuntime; -import net.sourceforge.jnlp.tools.CertVerifier; /** * Provides a base for JNLP warning dialogs.
--- a/rt/net/sourceforge/jnlp/security/SecurityWarningDialog.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/SecurityWarningDialog.java Mon Jan 26 23:12:40 2009 +0000 @@ -38,7 +38,6 @@ package net.sourceforge.jnlp.security; import net.sourceforge.jnlp.JNLPFile; -import net.sourceforge.jnlp.tools.CertVerifier; import java.awt.*; import javax.swing.*;
--- a/rt/net/sourceforge/jnlp/security/SingleCertInfoPane.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/SingleCertInfoPane.java Mon Jan 26 23:12:40 2009 +0000 @@ -45,7 +45,6 @@ import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.TreeSelectionModel; -import net.sourceforge.jnlp.tools.CertVerifier; public class SingleCertInfoPane extends CertsInfoPane {
--- a/rt/net/sourceforge/jnlp/security/VariableX509TrustManager.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/VariableX509TrustManager.java Mon Jan 26 23:12:40 2009 +0000 @@ -144,9 +144,6 @@ * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission */ public void checkServerTrusted(X509Certificate[] chain, String authType, boolean checkOnly) throws CertificateException { - for (int i=0; i < chain.length; i++) - System.err.println("checkServerTrusted chain@" + i + " = " + chain[i]); - try { checkAllManagers(chain, authType); } catch (CertificateException ce) {
--- a/rt/net/sourceforge/jnlp/security/viewer/CertificatePane.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/security/viewer/CertificatePane.java Mon Jan 26 23:12:40 2009 +0000 @@ -63,10 +63,10 @@ import javax.swing.UIManager; import javax.swing.table.DefaultTableModel; +import net.sourceforge.jnlp.security.CertVerifier; import net.sourceforge.jnlp.security.SecurityDialogUI; import net.sourceforge.jnlp.security.SecurityUtil; import net.sourceforge.jnlp.security.SecurityWarningDialog; -import net.sourceforge.jnlp.tools.CertVerifier; import net.sourceforge.jnlp.tools.KeyTool; //import java.security.KeyStoreException;
--- a/rt/net/sourceforge/jnlp/tools/CertVerifier.java Mon Jan 26 23:09:32 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* VariableX509TrustManager.java - Copyright (C) 2009 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. - -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. -*/ - -package net.sourceforge.jnlp.tools; - -import java.security.cert.CertPath; -import java.security.cert.Certificate; -import java.util.ArrayList; - -/** - * An interface that provides various details about a certificate - */ - -public interface CertVerifier { - - /** - * Return if the publisher is already trusted - */ - public boolean getAlreadyTrustPublisher(); - - /** - * Return if the root is in CA certs - */ - public boolean getRootInCacerts(); - - /** - * Return if there are signing issues with the certificate(s) being veried - */ - public boolean hasSigningIssues(); - - /** - * Return if there are no signing issues with this cert (!hasSigningIssues()) - */ - public boolean noSigningIssues(); - - /** - * Get the details regarding issue(s) with this certificate - */ - public ArrayList<String> getDetails(); - - /** - * Return a valid certificate path to this certificate(s) being verified - * @return The CertPath - */ - public ArrayList<CertPath> getCerts(); - - /** - * Returns the application's publisher's certificate. - */ - public abstract Certificate getPublisher(); - - /** - * Returns the application's root's certificate. This - * may return the same certificate as getPublisher() in - * the event that the application is self signed. - */ - public abstract Certificate getRoot(); -} \ No newline at end of file
--- a/rt/net/sourceforge/jnlp/tools/KeyTool.java Mon Jan 26 23:09:32 2009 +0000 +++ b/rt/net/sourceforge/jnlp/tools/KeyTool.java Mon Jan 26 23:12:40 2009 +0000 @@ -374,7 +374,6 @@ j++; } //return newChain; - System.out.println("newChain's size: " + newChain.length); return newChain != null; } else { throw new Exception("Failed to establish chain from reply");
--- a/visualvm.desktop Mon Jan 26 23:09:32 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=OpenJDK VisualVM -Comment=Integrates commandline JDK tools and profiling capabilites. -Exec=/usr/bin/jvisualvm -Icon=java -Terminal=false -Type=Application -Categories=Development;Java; -Version=1.0