Bug 784678 - Error when calling postCancel and postSuccess in an activity [r=gwagner]
authorFabrice Desré <fabrice@mozilla.com>
Wed, 22 Aug 2012 18:20:09 -0700
changeset 105133 24ae54fe53a7bf05267f2dc57fca27a9cb70e76e
parent 105132 7bced3d7427a358ea34309e5cff939ca215f510e
child 105134 8c95a0d692faed3f0ff71174f354a1f5879cd3df
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersgwagner
bugs784678
milestone17.0a1
Bug 784678 - Error when calling postCancel and postSuccess in an activity [r=gwagner]
dom/activities/src/ActivityRequestHandler.js
--- a/dom/activities/src/ActivityRequestHandler.js
+++ b/dom/activities/src/ActivityRequestHandler.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
- 
+
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "cpmm", function() {
   return Cc["@mozilla.org/childprocessmessagemanager;1"]
            .getService(Ci.nsIFrameMessageManager)
            .QueryInterface(Ci.nsISyncMessageSender);
 });
 
@@ -26,25 +26,31 @@ function debug(aMsg) {
 
 function ActivityRequestHandler() {
   debug("ActivityRequestHandler");
   this.wrappedJSObject = this;
 
   // When a system message of type 'activity' is emitted, it forces the
   // creation of an ActivityWrapper which in turns replace the default
   // system message callback. The newly created wrapper then create a
-  // nsIDOMActivityRequestHandler object and fills up the properties of 
+  // nsIDOMActivityRequestHandler object and fills up the properties of
   // this object as well as the properties of the nsIDOMActivityOptions
   // object contains by the request handler.
   this._id = null;
   this._options = Cc["@mozilla.org/dom/activities/options;1"]
                     .createInstance(Ci.nsIDOMMozActivityOptions);
 }
 
 ActivityRequestHandler.prototype = {
+  __exposedProps__: {
+                      source: "r",
+                      postResult: "r",
+                      postError: "r"
+                    },
+
   get source() {
     return this._options;
   },
 
   postResult: function arh_postResult(aResult) {
     cpmm.sendAsyncMessage("Activity:PostResult", {
       "id": this._id,
       "result": aResult