Fix public issue where Dictionary was seeing the special key added
by the Chrome Developer plugin to preserve identity.
Public review: http://gwt-code-reviews.appspot.com/144807/show
Issue: 4486
Patch by: jat
Review by: jgw
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7599 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html b/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
index e8983af..239f59c 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
@@ -60,6 +60,12 @@
Object.prototype.hasOwnProperty = function(prop) {
return prop != "__gwt_ObjectId" && hop.call(this, prop);
};
+ // do the same in our parent as well -- see issue 4486
+ // NOTE: this will have to be changed when we support non-iframe-based DevMode
+ var hop2 = parent.Object.prototype.hasOwnProperty;
+ parent.Object.prototype.hasOwnProperty = function(prop) {
+ return prop != "__gwt_ObjectId" && hop2.call(this, prop);
+ };
}
// wrapper to call JS methods, which we need both to be able to supply a