Revision: 9861
Author:   fabio...@google.com
Date:     Thu Mar 17 12:28:03 2011
Log:      non fatal js exception escapes in IE9 devmode.
http://code.google.com/p/google-web-toolkit/issues/detail?id=6135

Review at http://gwt-code-reviews.appspot.com/1387802

Review by: jlaba...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9861

Modified:
 /trunk/user/src/com/google/gwt/core/client/impl/Impl.java
 /trunk/user/src/com/google/gwt/user/client/impl/DOMImplStandard.java
 /trunk/user/src/com/google/gwt/user/client/impl/DOMImplStandardBase.java

=======================================
--- /trunk/user/src/com/google/gwt/core/client/impl/Impl.java Thu Dec 16 11:33:51 2010 +++ /trunk/user/src/com/google/gwt/core/client/impl/Impl.java Thu Mar 17 12:28:03 2011
@@ -167,7 +167,7 @@
     if (@com.google.gwt.core.client.GWT::isScript()()) {
       return jsFunction.apply(thisObj, arguments);
     } else {
-      _ = jsFunction.apply(thisObj, arguments);
+      var _ = jsFunction.apply(thisObj, arguments);
       if (_ != null) {
         // Wrap for Development Mode
         _ = Object(_);
=======================================
--- /trunk/user/src/com/google/gwt/user/client/impl/DOMImplStandard.java Tue Mar 1 06:29:34 2011 +++ /trunk/user/src/com/google/gwt/user/client/impl/DOMImplStandard.java Thu Mar 17 12:28:03 2011
@@ -145,43 +145,23 @@

   @Override
   protected native void initEventSystem() /*-{
- @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent = $entry(function(evt) { - if ((@com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedEvent)(evt)) { - var cap = @com.google.gwt.user.client.impl.DOMImplStandard::captureElem;
-        if (cap && cap.__listener) {
- if (@com.google.gwt.user.client.impl.DOMImpl::isMyListener(Ljava/lang/Object;)(cap.__listener)) { - @com.google.gwt.user.client.DOM::dispatchEvent(Lcom/google/gwt/user/client/Event;Lcom/google/gwt/user/client/Element;Lcom/google/gwt/user/client/EventListener;)(evt, cap, cap.__listener);
-            evt.stopPropagation();
-          }
-        }
-      }
-    });
-
@com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedEvent = $entry(function(evt) { if (!@com.google.gwt.user.client.DOM::previewEvent(Lcom/google/gwt/user/client/Event;)(evt)) {
         evt.stopPropagation();
         evt.preventDefault();
         return false;
       }
-
       return true;
     });

- @com.google.gwt.user.client.impl.DOMImplStandard::dispatchUnhandledEvent = $entry(function(evt) {
-      this.__gwtLastUnhandledEvent = evt.type;
- @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent.call(this, evt);
-    });
-
@com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent = $entry(function(evt) {
       var listener, curElem = this;
       while (curElem && !(listener = curElem.__listener)) {
         curElem = curElem.parentNode;
       }
-
       if (curElem && curElem.nodeType != 1) {
         curElem = null;
       }
-
       if (listener) {
if (@com.google.gwt.user.client.impl.DOMImpl::isMyListener(Ljava/lang/Object;)(listener)) { @com.google.gwt.user.client.DOM::dispatchEvent(Lcom/google/gwt/user/client/Event;Lcom/google/gwt/user/client/Element;Lcom/google/gwt/user/client/EventListener;)(evt, curElem, listener);
@@ -189,6 +169,24 @@
       }
     });

+ @com.google.gwt.user.client.impl.DOMImplStandard::dispatchUnhandledEvent = $entry(function(evt) {
+      this.__gwtLastUnhandledEvent = evt.type;
+ @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent.call(this, evt);
+    });
+
+ @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent = $entry(function(evt) { + var dispatchCapturedEventFn = @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedEvent;
+      if (dispatchCapturedEventFn(evt)) {
+ var cap = @com.google.gwt.user.client.impl.DOMImplStandard::captureElem;
+        if (cap && cap.__listener) {
+ if (@com.google.gwt.user.client.impl.DOMImpl::isMyListener(Ljava/lang/Object;)(cap.__listener)) { + @com.google.gwt.user.client.DOM::dispatchEvent(Lcom/google/gwt/user/client/Event;Lcom/google/gwt/user/client/Element;Lcom/google/gwt/user/client/EventListener;)(evt, cap, cap.__listener);
+            evt.stopPropagation();
+          }
+        }
+      }
+    });
+
$wnd.addEventListener('click', @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent, true); $wnd.addEventListener('dblclick', @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent, true); $wnd.addEventListener('mousedown', @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent, true);
=======================================
--- /trunk/user/src/com/google/gwt/user/client/impl/DOMImplStandardBase.java Fri Mar 11 09:47:37 2011 +++ /trunk/user/src/com/google/gwt/user/client/impl/DOMImplStandardBase.java Thu Mar 17 12:28:03 2011
@@ -16,7 +16,7 @@
 package com.google.gwt.user.client.impl;

 /**
- * Safari implementation of {@link com.google.gwt.user.client.impl.DOMImpl}. + * StandardBase implementation of {@link com.google.gwt.user.client.impl.DOMImpl}.
  */
 class DOMImplStandardBase extends DOMImplStandard {
 }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to