Goktug Gokdogan has uploaded a new change for review.

  https://gwt-review.googlesource.com/3510


Change subject: Fixes GWT.runAsync that was broken in a recent patch.
......................................................................

Fixes GWT.runAsync that was broken in a recent patch.

This is a regression to my previous change to GWT.runAsync to make it always
run async.
In the previous patch, GWT.runAsync was calling overloaded GWT.runAsync that
is treated as a split point itself. Apparently, it was treated as a split
point before the code was replaced for production mode.

This patch avoids the problem by delegating both runAsync calls to a helper
method.

Change-Id: If396a7f72ac533b304daf4d8afd8684d25e018ba
---
M user/src/com/google/gwt/core/client/GWT.java
1 file changed, 7 insertions(+), 2 deletions(-)



diff --git a/user/src/com/google/gwt/core/client/GWT.java b/user/src/com/google/gwt/core/client/GWT.java
index 3d3440d..6216e27 100644
--- a/user/src/com/google/gwt/core/client/GWT.java
+++ b/user/src/com/google/gwt/core/client/GWT.java
@@ -258,14 +258,19 @@
    * should use the same name.
    */
@SuppressWarnings("unused") // parameter will be used following replacement
-  public static void runAsync(Class<?> name, RunAsyncCallback callback) {
-    runAsync(callback);
+ public static void runAsync(Class<?> name, final RunAsyncCallback callback) {
+    runAsyncImpl(callback);
   }
+

   /**
* Run the specified callback once the necessary code for it has been loaded.
    */
   public static void runAsync(final RunAsyncCallback callback) {
+    runAsyncImpl(callback);
+  }
+
+  private static void runAsyncImpl(final RunAsyncCallback callback) {
     Scheduler.get().scheduleDeferred(new ScheduledCommand() {
       @Override public void execute() {
         callback.onSuccess();

--
To view, visit https://gwt-review.googlesource.com/3510
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If396a7f72ac533b304daf4d8afd8684d25e018ba
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan <gok...@google.com>

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to