ripple-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject incubator-ripple git commit: Fixed RIPPLE-88
Date Thu, 18 Jun 2015 17:09:20 GMT
Repository: incubator-ripple
Updated Branches:
  refs/heads/master 7830f1ac7 -> 139105001


Fixed RIPPLE-88

The previous fix for RIPPLE-74 rendered the properties created by Ripple
both non-configurable and non-enumable.  Making the properties
non-configurable means they cannot be replaced by the program under test,
and it turns out that cordova.js does just this, hence RIPPLE-88.

I marked the new properties as both configureable and enumerable.
The A+ solution would be to test to see if the property being defined
already exists, and if it does, then use the existing metadata values
for writable and enumerable, but I didn't do all that.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/13910500
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/13910500
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/13910500

Branch: refs/heads/master
Commit: 139105001116f9afc86edc6b07314aea187d4c96
Parents: 7830f1a
Author: Julian Horn <julian.c.horn@intel.com>
Authored: Thu Jun 18 10:40:43 2015 -0400
Committer: Julian Horn <julian.c.horn@intel.com>
Committed: Thu Jun 18 10:40:43 2015 -0400

----------------------------------------------------------------------
 lib/client/emulatorBridge.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/13910500/lib/client/emulatorBridge.js
----------------------------------------------------------------------
diff --git a/lib/client/emulatorBridge.js b/lib/client/emulatorBridge.js
index 710b03b..0db2fba 100644
--- a/lib/client/emulatorBridge.js
+++ b/lib/client/emulatorBridge.js
@@ -79,10 +79,10 @@ module.exports = {
         function marshal(obj, key) {
             // Use defineProperty, otherwise we won't be able to override built-in read-only
properties.
             Object.defineProperty(window, key, {
-                value: obj
+                value: obj, configurable: true, enumerable: true
             });
             Object.defineProperty(win, key, {
-                value: obj
+                value: obj, configurable: true, enumerable: true
             });
         }
 


Mime
View raw message