From 89e14c9470194d348eb7e11717c461cadb87fc47 Mon Sep 17 00:00:00 2001 From: Grant Gayed Date: Tue, 15 Dec 2009 17:32:25 +0000 Subject: 295185 - Refresh of PDF in SWT browser leads to jvm crash --- .../win32/org/eclipse/swt/dnd/Clipboard.java | 4 +++- .../win32/org/eclipse/swt/dnd/DragSource.java | 4 +++- .../win32/org/eclipse/swt/dnd/DropTarget.java | 8 ++++++-- .../win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java | 4 +++- 4 files changed, 15 insertions(+), 5 deletions(-) (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop') diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java index 10a3126cef..913d7d839e 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java @@ -649,7 +649,9 @@ private int Release() { this.data = new Object[0]; this.transferAgents = new Transfer[0]; disposeCOMInterfaces(); - COM.CoFreeUnusedLibraries(); + if (COM.FreeUnusedLibraries) { + COM.CoFreeUnusedLibraries(); + } } return refCount; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java index a7f220de1f..4e83e954f1 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java @@ -655,7 +655,9 @@ private int Release() { refCount--; if (refCount == 0) { disposeCOMInterfaces(); - COM.CoFreeUnusedLibraries(); + if (COM.FreeUnusedLibraries) { + COM.CoFreeUnusedLibraries(); + } } return refCount; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java index d8258bd77f..fe7785ec2e 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java @@ -571,7 +571,9 @@ void onDispose () { } iDataObject = null; - COM.CoFreeUnusedLibraries(); + if (COM.FreeUnusedLibraries) { + COM.CoFreeUnusedLibraries(); + } } int opToOs(int operation) { @@ -627,7 +629,9 @@ int Release() { if (refCount == 0) { disposeCOMInterfaces(); - COM.CoFreeUnusedLibraries(); + if (COM.FreeUnusedLibraries) { + COM.CoFreeUnusedLibraries(); + } } return refCount; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java index c1c8c1fbd6..bfe4acb3c8 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java @@ -133,7 +133,9 @@ int Release() { if (refCount == 0) { disposeCOMInterfaces(); - COM.CoFreeUnusedLibraries(); + if (COM.FreeUnusedLibraries) { + COM.CoFreeUnusedLibraries(); + } } return refCount; -- cgit