Bug 842981 - Part 1: Add ObjectWrapper to wrap array object. r=gwagner

This commit is contained in:
Yoshi Huang 2013-03-18 15:06:36 +08:00
parent d6c2c3c61e
commit b2dfc1cf42

View File

@ -14,6 +14,7 @@ const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/DOMRequestHelper.jsm");
Cu.import("resource://gre/modules/ObjectWrapper.jsm");
XPCOMUtils.defineLazyGetter(Services, "DOMRequest", function() {
return Cc["@mozilla.org/dom/dom-request-service;1"].getService(Ci.nsIDOMRequestService);
@ -454,7 +455,8 @@ ContactManager.prototype = {
return contact;
});
if (DEBUG) debug("result: " + JSON.stringify(result));
Services.DOMRequest.fireSuccess(req.request, result);
Services.DOMRequest.fireSuccess(req.request,
ObjectWrapper.wrap(result, this._window));
} else {
if (DEBUG) debug("no request stored!" + msg.requestID);
}