summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-03-30 18:39:21 +0300
committerArtur Signell <artur@vaadin.com>2012-03-30 18:39:21 +0300
commit7dc23cacce4c98c5c4a9fbf0b0044d7a312de3c3 (patch)
tree0128f964bb3ec60c8e0e49ac6e0d51be06cd614a /src/com
parentf38da072d3d3846b987da3160bb458eaa14747e0 (diff)
parenta6e0d4d7ea1e47a2ced9cb2278e2944e8bbcbe16 (diff)
downloadvaadin-framework-7dc23cacce4c98c5c4a9fbf0b0044d7a312de3c3.tar.gz
vaadin-framework-7dc23cacce4c98c5c4a9fbf0b0044d7a312de3c3.zip
Merge remote-tracking branch 'origin/6.8'
Conflicts: tests/test.xml
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ApplicationConnection.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
index 2d198e8c52..31a1bf2954 100644
--- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
+++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
@@ -745,6 +745,10 @@ public class ApplicationConnection {
}
protected void startRequest() {
+ if (hasActiveRequest) {
+ throw new IllegalStateException(
+ "Trying to start a new request while another is active");
+ }
hasActiveRequest = true;
requestStartTime = new Date();
// show initial throbber
@@ -769,11 +773,18 @@ public class ApplicationConnection {
}
protected void endRequest() {
+ if (!hasActiveRequest) {
+ throw new IllegalStateException("No active request");
+ }
+ // After checkForPendingVariableBursts() there may be a new active
+ // request, so we must set hasActiveRequest to false before, not after,
+ // the call. Active requests used to be tracked with an integer counter,
+ // so setting it after used to work but not with the #8505 changes.
+ hasActiveRequest = false;
if (applicationRunning) {
checkForPendingVariableBursts();
runPostRequestHooks(configuration.getRootPanelId());
}
- hasActiveRequest = false;
// deferring to avoid flickering
Scheduler.get().scheduleDeferred(new Command() {
public void execute() {