aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-05-18 13:39:06 +0300
committerMika Murtojarvi <mika@vaadin.com>2015-05-25 13:50:41 +0300
commit0c4b02dad38a265b6fdd7d491164614902ec9c12 (patch)
treebb153eb9bae72d9eee6a4e49ccba9a3df48de32f
parentaef530fc3a09f520cde52cca0ece1f4065764e4d (diff)
downloadvaadin-framework-0c4b02dad38a265b6fdd7d491164614902ec9c12.tar.gz
vaadin-framework-0c4b02dad38a265b6fdd7d491164614902ec9c12.zip
Ensure VDebugWindow.get() always returns the real instance (#17871)
Change-Id: Ia0af0cc3e6c3129a117dd31e6bce54e1226eb9c7
-rw-r--r--client/src/com/vaadin/client/ApplicationConfiguration.java2
-rw-r--r--client/src/com/vaadin/client/debug/internal/VDebugWindow.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConfiguration.java b/client/src/com/vaadin/client/ApplicationConfiguration.java
index f4b2c93111..0db8dc297e 100644
--- a/client/src/com/vaadin/client/ApplicationConfiguration.java
+++ b/client/src/com/vaadin/client/ApplicationConfiguration.java
@@ -688,7 +688,7 @@ public class ApplicationConfiguration implements EntryPoint {
* cleared up when an API for extending the debug window is
* implemented.
*/
- VDebugWindow window = GWT.create(VDebugWindow.class);
+ VDebugWindow window = VDebugWindow.get();
if (LogConfiguration.loggingIsEnabled()) {
window.addSection((Section) GWT.create(LogSection.class));
diff --git a/client/src/com/vaadin/client/debug/internal/VDebugWindow.java b/client/src/com/vaadin/client/debug/internal/VDebugWindow.java
index 3393d7371b..b543c23e4d 100644
--- a/client/src/com/vaadin/client/debug/internal/VDebugWindow.java
+++ b/client/src/com/vaadin/client/debug/internal/VDebugWindow.java
@@ -19,6 +19,7 @@ import java.util.ArrayList;
import java.util.Date;
import com.google.gwt.core.client.Duration;
+import com.google.gwt.core.shared.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.dom.client.Style;
@@ -174,7 +175,6 @@ public final class VDebugWindow extends VOverlay {
*/
public VDebugWindow() {
super(false, false);
- instance = this;
getElement().getStyle().setOverflow(Overflow.HIDDEN);
setStylePrimaryName(STYLENAME);
@@ -255,7 +255,7 @@ public final class VDebugWindow extends VOverlay {
*/
public static VDebugWindow get() {
if (instance == null) {
- instance = new VDebugWindow();
+ instance = GWT.create(VDebugWindow.class);
}
return instance;
}