cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject js commit: CB-7868 Make <clobbers> on navigator not break on some versions of Android
Date Tue, 04 Nov 2014 19:20:15 GMT
Repository: cordova-js
Updated Branches:
  refs/heads/master 91157c2e1 -> f0ceadfd6


CB-7868 Make <clobbers> on navigator not break on some versions of Android


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

Branch: refs/heads/master
Commit: f0ceadfd6f59c3bfc7db2922bfd08b4ea8cafe45
Parents: 91157c2
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Nov 4 14:18:17 2014 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Nov 4 14:18:17 2014 -0500

----------------------------------------------------------------------
 src/common/builder.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f0ceadfd/src/common/builder.js
----------------------------------------------------------------------
diff --git a/src/common/builder.js b/src/common/builder.js
index 826820d..75d3ea7 100644
--- a/src/common/builder.js
+++ b/src/common/builder.js
@@ -31,9 +31,14 @@ function each(objects, func, context) {
 
 function clobber(obj, key, value) {
     exports.replaceHookForTesting(obj, key);
-    obj[key] = value;
+    var needsProperty = false;
+    try {
+        obj[key] = value;
+    } catch (e) {
+        needsProperty = true;
+    }
     // Getters can only be overridden by getters.
-    if (obj[key] !== value) {
+    if (needsProperty || obj[key] !== value) {
         utils.defineGetter(obj, key, function() {
             return value;
         });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message