Reviewers: bobbrose_google.com, Description: Avoids a hidden NPE in eventGetRelatedTarget() when Mozilla decides to return a null value for Event.relatedTarget. This NPE was getting trapped by an exception handler, but was wreaking havoc for people debugging compiled code under Firebug (with "stop on all errors" enabled).
Please review this at http://gwt-code-reviews.appspot.com/819801/show Affected files: M user/src/com/google/gwt/dom/client/DOMImplMozilla.java Index: user/src/com/google/gwt/dom/client/DOMImplMozilla.java =================================================================== --- user/src/com/google/gwt/dom/client/DOMImplMozilla.java (revision 8671) +++ user/src/com/google/gwt/dom/client/DOMImplMozilla.java (working copy) @@ -66,6 +66,9 @@ // elements). Trying to access relatedTarget.nodeName will throw an // exception if it's a XUL element. var relatedTarget = evt.relatedTarget; + if (!relatedTarget) { + return null; + } try { var nodeName = relatedTarget.nodeName; return relatedTarget; -- http://groups.google.com/group/Google-Web-Toolkit-Contributors