From 611a4980e84fa90066bc46c39889d6de9675390b Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 7 Mar 2013 10:33:01 +0200 Subject: Set to empty function instead of undefined (#10960) It seems that the presence of the function is checked once while it is still set and it will be later called without additional checks that it is still set. Change-Id: Ie985d9047f4d2ca469f1a406ba40bca0ac3a59e9 --- client/src/com/vaadin/client/Profiler.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/com/vaadin/client/Profiler.java b/client/src/com/vaadin/client/Profiler.java index 6230828281..6e8f2f5f9a 100644 --- a/client/src/com/vaadin/client/Profiler.java +++ b/client/src/com/vaadin/client/Profiler.java @@ -532,9 +532,7 @@ public class Profiler { if (typeof $wnd.vaadin.gwtStatsEvents == 'object') { delete $wnd.vaadin.gwtStatsEvents; if (typeof $wnd.__gwtStatsEvent == 'function') { - // IE8 refuses to delete window properties - $wnd.__gwtStatsEvent = undefined; - try { delete $wnd.__gwtStatsEvent;} catch (e) {} + $wnd.__gwtStatsEvent = function(){}; } } }-*/; -- cgit v1.2.3