Fix: "__gwt_ObjectId" is fetched in for-in loop in DevMode.
Issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=6986
Review at http://gwt-code-reviews.appspot.com/1592803
Review by: jat@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10774 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js b/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
index b1d9726..aebf9c7 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
@@ -197,11 +197,19 @@
window.Object.prototype.hasOwnProperty = function(prop) {
return prop != "__gwt_ObjectId" && hop.call(this, prop);
};
+ var hop2 = window.Object.prototype.propertyIsEnumerable;
+ window.Object.prototype.propertyIsEnumerable = function(prop) {
+ return prop != "__gwt_ObjectId" && hop2.call(this, prop);
+ };
// do the same in the main window if it is different from our window
if ($wnd != window) {
- var hop2 = $wnd.Object.prototype.hasOwnProperty;
+ var hop3 = $wnd.Object.prototype.hasOwnProperty;
$wnd.Object.prototype.hasOwnProperty = function(prop) {
- return prop != "__gwt_ObjectId" && hop2.call(this, prop);
+ return prop != "__gwt_ObjectId" && hop3.call(this, prop);
+ };
+ var hop4 = $wnd.Object.prototype.propertyIsEnumerable;
+ $wnd.Object.prototype.propertyIsEnumerable = function(prop) {
+ return prop != "__gwt_ObjectId" && hop4.call(this, prop);
};
}
}