Reviewers: rdayal,

Description:
JsonpRequest should not use DeferredCommand

Repost of 1694804

Thanks Patrick!


Please review this at http://gwt-code-reviews.appspot.com/1725804/

Affected files:
  M user/src/com/google/gwt/jsonp/client/JsonpRequest.java


Index: user/src/com/google/gwt/jsonp/client/JsonpRequest.java
===================================================================
--- user/src/com/google/gwt/jsonp/client/JsonpRequest.java      (revision 10982)
+++ user/src/com/google/gwt/jsonp/client/JsonpRequest.java      (working copy)
@@ -16,11 +16,11 @@
 package com.google.gwt.jsonp.client;

 import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.dom.client.Document;
 import com.google.gwt.dom.client.Node;
 import com.google.gwt.dom.client.ScriptElement;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
 import com.google.gwt.user.client.Timer;
 import com.google.gwt.user.client.rpc.AsyncCallback;

@@ -319,7 +319,7 @@
      * scope of the script itself. Therefore, we need to defer the delete
      * statement after the callback execution.
      */
-    DeferredCommand.addCommand(new Command() {
+    Scheduler.get().scheduleDeferred(new ScheduledCommand() {
       public void execute() {
         if (!canHaveMultipleRequestsForSameId) {
           // If there can me multiple requests for a particular ID, then we


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

Reply via email to