Backed out changeset e8cd4e639e41 (bug 1257734) for test failures in /test_try_registering_offline_disabled.html on a CLOSED TREE
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 30 Mar 2016 12:31:02 +0200
changeset 291043 2eeff30a55024f432f65e66bdb66690af8640aef
parent 291042 e8cd4e639e410abc015b6c4211059e700a39c9c3
child 291044 6dd2e8d7ecfcb2ba23ea348aa51e7583ebeb7fd3
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1257734
milestone48.0a1
backs oute8cd4e639e410abc015b6c4211059e700a39c9c3
Backed out changeset e8cd4e639e41 (bug 1257734) for test failures in /test_try_registering_offline_disabled.html on a CLOSED TREE
testing/specialpowers/content/specialpowersAPI.js
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -355,23 +355,20 @@ function wrapCallback(cb) {
     return cb.apply(this, args);
   }
 }
 
 function wrapCallbackObject(obj) {
   obj = Cu.waiveXrays(obj);
   var wrapper = {};
   for (var i in obj) {
-    var property = Object.getOwnPropertyDescriptor(obj, i);
-    for (var key in property) {
-      if (typeof property[key] == 'function') {
-        property[key] = wrapCallback(property[key]);
-      }
-    }
-    Object.defineProperty(wrapper, i, property);
+    if (typeof obj[i] == 'function')
+      wrapper[i] = wrapCallback(obj[i]);
+    else
+      wrapper[i] = obj[i];
   }
   return wrapper;
 }
 
 function setWrapped(obj, prop, val) {
   if (!isWrapper(obj))
     throw "You only need to use this for SpecialPowers wrapped objects";
 
@@ -688,17 +685,17 @@ SpecialPowersAPI.prototype = {
      }
      return delayedCallback;
   },
 
   /* apply permissions to the system and when the test case is finished (SimpleTest.finish())
      we will revert the permission back to the original.
 
      inPermissions is an array of objects where each object has a type, action, context, ex:
-     [{'type': 'SystemXHR', 'allow': 1, 'context': document},
+     [{'type': 'SystemXHR', 'allow': 1, 'context': document}, 
       {'type': 'SystemXHR', 'allow': Ci.nsIPermissionManager.PROMPT_ACTION, 'context': document}]
 
      Allow can be a boolean value of true/false or ALLOW_ACTION/DENY_ACTION/PROMPT_ACTION/UNKNOWN_ACTION
   */
   pushPermissions: function(inPermissions, callback) {
     inPermissions = Cu.waiveXrays(inPermissions);
     var pendingPermissions = [];
     var cleanupPermissions = [];