# HG changeset patch # User Atul Varma # Date 1245694301 25200 # Node ID 64de55cd54a4cef3fc676e6f819ee3d4c5232260 # Parent 69622f55fcf6dba50fada6ce0d79f038fc9e4a10 Changed getProperty() of SafeWrapper. diff -r 69622f55fcf6 -r 64de55cd54a4 tcb.js --- a/tcb.js Mon Jun 22 10:59:51 2009 -0700 +++ b/tcb.js Mon Jun 22 11:11:41 2009 -0700 @@ -120,13 +120,15 @@ }, getProperty: function(wrappee, wrapper, id, defaultValue) { - if (id && id != "prototype" && id[0] != "_") { - if (defaultValue === undefined) { - defaultValue = lookupProperty(wrappee, id); - } - return this._maybeWrap(defaultValue); + switch (id) { + case "prototype": + case "caller": + case "__proto__": + case "__parent__": + return null; + default: + return this._maybeWrap(lookupProperty(wrappee, id)); } - return undefined; }, setProperty: function() {