Bug 987111 - Temporarily waive Xrays on the aOptions argument passed to mozId.watch and mozId.request. r=jedp
☠☠ backed out by fe14647a422d ☠ ☠
authorBobby Holley <bobbyholley@gmail.com>
Wed, 04 Jun 2014 15:12:25 -0700
changeset 207000 1a8dc1af9de67d5af9079643f783d179e243f810
parent 206999 243d19db57a53731f2a12b4a588ae09d99e00bed
child 207001 7576a51cf72e705f51ffe5cd6d153cc827662345
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjedp
bugs987111, 1011084
milestone32.0a1
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
Bug 987111 - Temporarily waive Xrays on the aOptions argument passed to mozId.watch and mozId.request. r=jedp Bug 1011084 is getting hung up on various things, and we're currently blocked on it because Object Xrays filter out callables. So let's just turn off Xrays here for that case, so that we can enable them everywhere else.
dom/identity/nsDOMIdentity.js
--- a/dom/identity/nsDOMIdentity.js
+++ b/dom/identity/nsDOMIdentity.js
@@ -97,16 +97,17 @@ nsDOMIdentity.prototype = {
     });
   },
 
   /**
    * Relying Party (RP) APIs
    */
 
   watch: function nsDOMIdentity_watch(aOptions = {}) {
+    aOptions = Cu.waiveXrays(aOptions);
     if (this._rpWatcher) {
       // For the initial release of Firefox Accounts, we support callers who
       // invoke watch() either for Firefox Accounts, or Persona, but not both.
       // In the future, we may wish to support the dual invocation (say, for
       // packaged apps so they can sign users in who reject the app's request
       // to sign in with their Firefox Accounts identity).
       throw new Error("navigator.id.watch was already called");
     }
@@ -148,16 +149,17 @@ nsDOMIdentity.prototype = {
       // We don't delete the rpWatcher object, because we don't want the
       // broken client to be able to call watch() any more.  It's broken.
       return;
     }
     this._identityInternal._mm.sendAsyncMessage("Identity:RP:Watch", message);
   },
 
   request: function nsDOMIdentity_request(aOptions = {}) {
+    aOptions = Cu.waiveXrays(aOptions);
     this._log("request: " + JSON.stringify(aOptions));
 
     // Has the caller called watch() before this?
     if (!this._rpWatcher) {
       throw new Error("navigator.id.request called before navigator.id.watch");
     }
     if (this._rpCalls > MAX_RP_CALLS) {
       throw new Error("navigator.id.request called too many times");