aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java')
-rw-r--r--server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java b/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java
index 503bf8c0ae..fe1cc0770c 100644
--- a/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java
+++ b/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java
@@ -26,6 +26,8 @@ import com.vaadin.server.AbstractClientConnector;
import com.vaadin.server.ClientConnector;
import com.vaadin.server.LegacyCommunicationManager;
import com.vaadin.server.PaintException;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinService;
import com.vaadin.ui.UI;
import elemental.json.Json;
@@ -87,6 +89,22 @@ public class ConnectorHierarchyWriter implements Serializable {
}
}
}
+ // Dummy assert just for conditionally storing away data that will be
+ // used by the real assert later on
+ assert storeSentHierarchy(hierarchyInfo);
+
writer.write(JsonUtil.stringify(hierarchyInfo));
}
+
+ private boolean storeSentHierarchy(JsonObject hierarchyInfo) {
+ VaadinRequest request = VaadinService.getCurrentRequest();
+ if (request != null) {
+ request.setAttribute(ConnectorHierarchyWriter.class.getName()
+ + ".hierarchyInfo", hierarchyInfo);
+ }
+
+ // Always true, we're just setting up for another assert
+ return true;
+ }
+
}