summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/ConnectorTracker.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-09-09 22:16:51 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-09 22:16:51 +0300
commit998c9c97b4b7d9531028b442df4c38a33b60e5f0 (patch)
tree9c81571efd63c3ebcf4fce03411486ac23e65041 /server/src/com/vaadin/ui/ConnectorTracker.java
parent98a934554a8a88e0b64e9bc4069ee2af82286efa (diff)
downloadvaadin-framework-998c9c97b4b7d9531028b442df4c38a33b60e5f0.tar.gz
vaadin-framework-998c9c97b4b7d9531028b442df4c38a33b60e5f0.zip
Verify that lock is held when accessing state (#9515)
Diffstat (limited to 'server/src/com/vaadin/ui/ConnectorTracker.java')
-rw-r--r--server/src/com/vaadin/ui/ConnectorTracker.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java
index d454df98ee..dbada63a47 100644
--- a/server/src/com/vaadin/ui/ConnectorTracker.java
+++ b/server/src/com/vaadin/ui/ConnectorTracker.java
@@ -29,6 +29,7 @@ import com.vaadin.server.AbstractClientConnector;
import com.vaadin.server.AbstractCommunicationManager;
import com.vaadin.server.ClientConnector;
import com.vaadin.server.GlobalResourceHandler;
+import com.vaadin.server.VaadinSession;
/**
* A class which takes care of book keeping of {@link ClientConnector}s for a
@@ -286,6 +287,8 @@ public class ConnectorTracker implements Serializable {
* The connector that should be marked clean.
*/
public void markDirty(ClientConnector connector) {
+ assert uI.getSession() == null
+ || uI.getSession().getLock().isHeldByCurrentThread() : VaadinSession.SESSION_LOCK_MESSAGE;
if (isWritingResponse()) {
throw new IllegalStateException(
"A connector should not be marked as dirty while a response is being written.");