diff options
author | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-09-11 10:21:42 -0400 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-09-11 10:22:51 -0400 |
commit | 2c1e3b3d7e8ee238ed9a1b0193fa5c0af85695fa (patch) | |
tree | f00937d9929bc1950d0c8110ccaf1fcad9d18399 /bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java | |
parent | d55854d1335ed9ed50b1cd188c785a2619d326fc (diff) | |
download | eclipse.platform.swt-2c1e3b3d7e8ee238ed9a1b0193fa5c0af85695fa.tar.gz eclipse.platform.swt-2c1e3b3d7e8ee238ed9a1b0193fa5c0af85695fa.tar.xz eclipse.platform.swt-2c1e3b3d7e8ee238ed9a1b0193fa5c0af85695fa.zip |
Bug 383890 - JVM (Eclipse) crash with SIGSEGV in ld-linux-x86-64.so.2
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java index 3a92ce31f8..3b1a5d7ad8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java @@ -122,25 +122,26 @@ static void loadAdditionalLibraries (String mozillaPath) { String libName = "libswt-xulrunner-fix.so"; //$NON-NLS-1$ File libsDir = new File (getProfilePath () + "/libs/" + Mozilla.OS() + '/' + Mozilla.Arch ()); //$NON-NLS-1$ File file = new File (libsDir, libName); - java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName); - if (is != null) { - if (!libsDir.exists ()) { - libsDir.mkdirs (); - } - int read; - byte [] buffer = new byte [4096]; - try { - FileOutputStream os = new FileOutputStream (file); - while ((read = is.read (buffer)) != -1) { - os.write(buffer, 0, read); + if (!file.exists()) { + java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName); + if (is != null) { + if (!libsDir.exists ()) { + libsDir.mkdirs (); + } + int read; + byte [] buffer = new byte [4096]; + try { + FileOutputStream os = new FileOutputStream (file); + while ((read = is.read (buffer)) != -1) { + os.write(buffer, 0, read); + } + os.close (); + is.close (); + } catch (FileNotFoundException e) { + } catch (IOException e) { } - os.close (); - is.close (); - } catch (FileNotFoundException e) { - } catch (IOException e) { } } - if (file.exists ()) { byte[] bytes = Converter.wcsToMbcs (null, file.getAbsolutePath (), true); OS.dlopen (bytes, OS.RTLD_NOW | OS.RTLD_GLOBAL); |