summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-05-18 13:39:06 +0300
committerVaadin Code Review <review@vaadin.com>2015-05-19 14:14:54 +0000
commit8bafe0f91947c9f33b2d22c1595a17fb016bef8e (patch)
tree5a71bb66fae4361da5aa29aaf9411df2bd7726a0
parentd63bf2c215831dcfea060331339199cc086d78f7 (diff)
downloadvaadin-framework-8bafe0f91947c9f33b2d22c1595a17fb016bef8e.tar.gz
vaadin-framework-8bafe0f91947c9f33b2d22c1595a17fb016bef8e.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;
}