cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [3/10] js commit: [all] Make utils.addGetter create configurable properties
Date Mon, 21 Jan 2013 18:01:39 GMT
[all] Make utils.addGetter create configurable properties

This is required in case a property is clobbered multiple times.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/54c05535
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/54c05535
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/54c05535

Branch: refs/heads/master
Commit: 54c05535d2b90213c8a1d0d7d7148ea842cf8e4a
Parents: d95a1b2
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Wed Jan 16 16:21:54 2013 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Wed Jan 16 16:33:47 2013 -0500

----------------------------------------------------------------------
 lib/common/utils.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/54c05535/lib/common/utils.js
----------------------------------------------------------------------
diff --git a/lib/common/utils.js b/lib/common/utils.js
index bfaa9cd..7b17217 100644
--- a/lib/common/utils.js
+++ b/lib/common/utils.js
@@ -26,7 +26,10 @@ var utils = exports;
  */
 utils.defineGetterSetter = function(obj, key, getFunc, opt_setFunc) {
     if (Object.defineProperty) {
-        var desc = {get:getFunc};
+        var desc = {
+            get: getFunc,
+            configurable: true
+        };
         if (opt_setFunc) {
             desc.set = opt_setFunc;
         }


Mime
View raw message