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 d0d15fd0ba
commit 6b90695868

View File

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