Keep from crashing IE hosted mode by recreating expired MethodDispatches.

Review by: bruce, jat (desk check)


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1990 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/windows/src/com/google/gwt/dev/shell/ie/IDispatchProxy.java b/dev/windows/src/com/google/gwt/dev/shell/ie/IDispatchProxy.java
index 05e83cc..f30963a 100644
--- a/dev/windows/src/com/google/gwt/dev/shell/ie/IDispatchProxy.java
+++ b/dev/windows/src/com/google/gwt/dev/shell/ie/IDispatchProxy.java
@@ -155,7 +155,7 @@
           } else if (flags == COM.DISPATCH_PROPERTYGET) {
             // The function is being accessed as a property.
             IDispatchImpl dispMethod = (IDispatchImpl) classLoader.getMethodDispatch(method);
-            if (dispMethod == null) {
+            if (dispMethod == null || dispMethod.refCount < 1) {
               dispMethod = new MethodDispatch(classLoader, method);
               classLoader.putMethodDispatch(method, dispMethod);
             }