]> source.dussan.org Git - vaadin-framework.git/commitdiff
Ensure VDebugWindow.get() always returns the real instance (#17871)
authorLeif Åstrand <leif@vaadin.com>
Mon, 18 May 2015 10:39:06 +0000 (13:39 +0300)
committerVaadin Code Review <review@vaadin.com>
Tue, 19 May 2015 14:14:54 +0000 (14:14 +0000)
Change-Id: Ia0af0cc3e6c3129a117dd31e6bce54e1226eb9c7

client/src/com/vaadin/client/ApplicationConfiguration.java
client/src/com/vaadin/client/debug/internal/VDebugWindow.java

index f4b2c931111f7de432dd4281410990d0e0b4a239..0db8dc297e99009541304fad00e4fe983d3b985b 100644 (file)
@@ -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));
index 3393d7371b4f010c0861e43b06c29a3339d7e2b3..b543c23e4dbd4c4aa5ac4047d78bd503210c037f 100644 (file)
@@ -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;
     }