summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@vaadin.com>2014-05-09 09:47:14 +0200
committerVaadin Code Review <review@vaadin.com>2014-05-16 12:47:40 +0000
commit3ecad007706be76bcd2183dd128259b94fdeb67a (patch)
tree94d1644506f64d64d757633586b048a31ea8d429 /client
parent9f19979ed856e3b002eb4066e157e7e0ab24fb95 (diff)
downloadvaadin-framework-3ecad007706be76bcd2183dd128259b94fdeb67a.tar.gz
vaadin-framework-3ecad007706be76bcd2183dd128259b94fdeb67a.zip
Avoid Vaadin entry-point being run twice (#13730)
- Prevent bootstrap script fail if registerWidgetset is called twice with the same widgetset. Change-Id: I8b8069b442ea91c1aa0f0b7dd73c41902e75094b
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ApplicationConfiguration.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConfiguration.java b/client/src/com/vaadin/client/ApplicationConfiguration.java
index d483b39a7b..543a48f61b 100644
--- a/client/src/com/vaadin/client/ApplicationConfiguration.java
+++ b/client/src/com/vaadin/client/ApplicationConfiguration.java
@@ -222,6 +222,7 @@ public class ApplicationConfiguration implements EntryPoint {
private boolean browserDetailsSent = false;
private boolean widgetsetVersionSent = false;
+ private static boolean moduleLoaded = false;
static// TODO consider to make this hashmap per application
LinkedList<Command> callbacks = new LinkedList<Command>();
@@ -596,6 +597,13 @@ public class ApplicationConfiguration implements EntryPoint {
@Override
public void onModuleLoad() {
+
+ // Don't run twice if the module has been inherited several times.
+ if (moduleLoaded) {
+ return;
+ }
+ moduleLoaded = true;
+
Profiler.initialize();
Profiler.enter("ApplicationConfiguration.onModuleLoad");