Revision: 6139
Author: [email protected]
Date: Mon Sep 14 13:00:41 2009
Log: Initialize the timer before adding the script in case it gets run  
synchronously
from cache.

Patch by: abrodersen
Review by: dwolf, jat

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

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

=======================================
--- /trunk/user/src/com/google/gwt/jsonp/client/JsonpRequest.java       Thu Aug 
 
27 20:54:30 2009
+++ /trunk/user/src/com/google/gwt/jsonp/client/JsonpRequest.java       Mon Sep 
 
14 13:00:41 2009
@@ -142,7 +142,6 @@
      script.setType("text/javascript");
      script.setId(callbackId);
      script.setSrc(uri.toString());
-    getHeadElement().appendChild(script);
      timer = new Timer() {
        @Override
        public void run() {
@@ -150,6 +149,7 @@
        }
      };
      timer.schedule(timeout);
+    getHeadElement().appendChild(script);
    }

    @SuppressWarnings("unused") // used by JSNI

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

Reply via email to