Bug 987111 - Temporarily waive Xrays on the aOptions argument passed to mozId.watch and mozId.request. r=jedp
authorBobby Holley <bobbyholley@gmail.com>
Thu, 05 Jun 2014 22:32:37 -0700
changeset 207324 500b82107c1886866b5e34fb71979bdae5e4e9dd
parent 207323 06e276460c5b32ee7254536fc7e211ea13de7f94
child 207325 0e0a7e21a765ec1c54ba380b77bb59643a04976d
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");