summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2014-09-12 16:49:48 +0300
committerHenri Sara <hesara@vaadin.com>2014-10-13 11:39:36 +0000
commit442b35ade51bd82c3e345b0833f67e3dbd85885f (patch)
tree0e1d76f1683604f1441faf77b97c1caf0db2f201 /client
parenta420906d61b0fd54ede8906fb494b5378c4bac5f (diff)
downloadvaadin-framework-442b35ade51bd82c3e345b0833f67e3dbd85885f.tar.gz
vaadin-framework-442b35ade51bd82c3e345b0833f67e3dbd85885f.zip
Assert that async UIDL processing happens in order (#14643)
Change-Id: Ib2502ad9dc4d28eca41e45efd025478d3f4330a0
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index d182706780..cba9639067 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -1457,8 +1457,9 @@ public class ApplicationConnection implements HasHandlers {
VConsole.log("Handling message from server");
eventBus.fireEvent(new ResponseHandlingStartedEvent(this));
+ final int syncId;
if (json.containsKey(ApplicationConstants.SERVER_SYNC_ID)) {
- int syncId = json.getInt(ApplicationConstants.SERVER_SYNC_ID);
+ syncId = json.getInt(ApplicationConstants.SERVER_SYNC_ID);
/*
* Use sync id unless explicitly set as undefined, as is done by
@@ -1471,6 +1472,7 @@ public class ApplicationConnection implements HasHandlers {
lastSeenServerSyncId = syncId;
}
} else {
+ syncId = -1;
VConsole.error("Server response didn't contain a sync id. "
+ "Please verify that the server is up-to-date and that the response data has not been modified in transmission.");
}
@@ -1541,6 +1543,8 @@ public class ApplicationConnection implements HasHandlers {
Command c = new Command() {
@Override
public void execute() {
+ assert syncId == -1 || syncId == lastSeenServerSyncId;
+
handleUIDLDuration.logDuration(" * Loading widgets completed",
10);