Revision: 6290
Author: [email protected]
Date: Fri Oct  2 15:07:42 2009
Log: Handle a case where the JSONP request succeeds after the timer has  
been fired
by checking to see if the script tag has already been removed.

Issu: 3993
Patch by: [email protected]
Review by: jat

http://code.google.com/p/google-web-toolkit/source/detail?r=6290

Modified:
  /trunk/user/src/com/google/gwt/jsonp/client/JsonpRequest.java

=======================================
--- /trunk/user/src/com/google/gwt/jsonp/client/JsonpRequest.java       Mon Sep 
 
14 13:00:41 2009
+++ /trunk/user/src/com/google/gwt/jsonp/client/JsonpRequest.java       Fri Oct 
  
2 15:07:42 2009
@@ -225,7 +225,10 @@
        public void execute() {
          unregisterCallbacks(CALLBACKS);
          Node script = Document.get().getElementById(callbackId);
-        getHeadElement().removeChild(script);
+        if (script != null) {
+          // The script may have already been deleted
+          getHeadElement().removeChild(script);
+        }
        }
      });
    }

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

Reply via email to