After upgrading HtmlUnit from 2.5 to 2.7-snapshot, sending an explicit QUIT
message when the module transition happens does not seem to be required. 

Patch by: amitmanjhi
Review by: jat (TBR)



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@6406 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelClient.java b/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelClient.java
index cdd4458..6a7f56a 100644
--- a/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelClient.java
+++ b/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelClient.java
@@ -63,7 +63,6 @@
   private final String url;
   private final String versionString;
   private boolean connected = false;
-  private boolean shouldDisconnect = false;
   private int protocolVersion;
 
   public BrowserChannelClient(String addressParts[], String url,
@@ -124,9 +123,6 @@
       new LoadModuleMessage(this, url, tabKey, sessionKey, moduleName,
           htmlUnitSessionHandler.getUserAgent()).send();
       returnMessage = reactToMessages(htmlUnitSessionHandler, true);
-      if (shouldDisconnect) {
-        disconnectFromHost();
-      }
     }
     logger.log(TreeLogger.DEBUG, "loaded module, returnValue: "
         + returnMessage.getReturnValue() + ", isException: "
@@ -138,16 +134,9 @@
       HtmlUnitSessionHandler handler) throws IOException,
       BrowserChannelException {
     ReturnMessage returnMessage = reactToMessages(handler, true);
-    if (shouldDisconnect) {
-      disconnectFromHost();
-    }
     return returnMessage;
   }
 
-  void setShouldDisconnect() {
-    shouldDisconnect = true;
-  }
-
   /*
    * Perform the initial interaction. Return true if interaction succeeds, false
    * if it fails. Do a check protocol versions, expected with 2.0+ oophm
diff --git a/dev/oophm/src/com/google/gwt/dev/shell/HtmlUnitSessionHandler.java b/dev/oophm/src/com/google/gwt/dev/shell/HtmlUnitSessionHandler.java
index e9a57f5..f1370f2 100644
--- a/dev/oophm/src/com/google/gwt/dev/shell/HtmlUnitSessionHandler.java
+++ b/dev/oophm/src/com/google/gwt/dev/shell/HtmlUnitSessionHandler.java
@@ -211,7 +211,6 @@
         if (!newUrl.equals(currentUrl)) {
           // TODO: removeAllJobs for all windows?
           window.getWebWindow().getTopWindow().getJobManager().removeAllJobs();
-          ((BrowserChannelClient) channel).setShouldDisconnect();
         }
       }
       result = jsEngine.callFunction(htmlPage, jsFunction, jsContext, window,