From 8bafe0f91947c9f33b2d22c1595a17fb016bef8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Mon, 18 May 2015 13:39:06 +0300 Subject: [PATCH] Ensure VDebugWindow.get() always returns the real instance (#17871) Change-Id: Ia0af0cc3e6c3129a117dd31e6bce54e1226eb9c7 --- client/src/com/vaadin/client/ApplicationConfiguration.java | 2 +- client/src/com/vaadin/client/debug/internal/VDebugWindow.java | 4 ++-- 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; } -- 2.39.5