From 3f395a181c89bbe8d9de12d7c70583da3ea08bb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Tue, 10 Dec 2013 11:21:43 +0100 Subject: [PATCH] Fix testLiveWithNameSpace --- .../java/com/google/gwt/query/client/js/JsCache.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java index fa604fe8..c8f00a6c 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java @@ -79,7 +79,7 @@ public class JsCache extends JavaScriptObject { } return (T)o; } - + public final native T get(Object id) /*-{ return @com.google.gwt.query.client.js.JsCache::gwtBox(*)([ this && this[id] ]); }-*/; @@ -129,11 +129,11 @@ public class JsCache extends JavaScriptObject { for (k in this) return false; return true; }-*/; - + public final native boolean contains(Object o)/*-{ return this.indexOf(o) >= 0; }-*/; - + public final native void remove(Object o) /*-{ var i = this.indexOf(o); if (i >= 0) this.splice(i, 1); @@ -229,8 +229,9 @@ public class JsCache extends JavaScriptObject { private final native JsArrayString keysImpl() /*-{ var key, keys=[]; - // Chrome in DevMode injects a property to JS objects - for(key in this) if (key != '__gwt_ObjectId') keys.push(String(key)); + // Chrome in DevMode sets '__gwt_ObjectId' to JS objects + // GWT sets '$H' when calling getHashCode (see com/google/gwt/core/client/impl/Impl.java) + for(key in this) if (key != '__gwt_ObjectId' && key != '$H') keys.push(String(key)); return keys; }-*/; -- 2.39.5