author | Carsten "Tomcat" Book <cbook@mozilla.com> |
Wed, 30 Mar 2016 12:31:02 +0200 | |
changeset 328855 | 2eeff30a55024f432f65e66bdb66690af8640aef |
parent 328854 | e8cd4e639e410abc015b6c4211059e700a39c9c3 |
child 328856 | 6dd2e8d7ecfcb2ba23ea348aa51e7583ebeb7fd3 |
push id | 6048 |
push user | kmoir@mozilla.com |
push date | Mon, 06 Jun 2016 19:02:08 +0000 |
treeherder | mozilla-beta@46d72a56c57d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1257734 |
milestone | 48.0a1 |
backs out | e8cd4e639e410abc015b6c4211059e700a39c9c3 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- 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 = [];