Bug 1065185 - Create content arrays rather than chrome arrays in DOM Apps. r=me
authorBobby Holley <bobbyholley@gmail.com>
Fri, 03 Oct 2014 10:05:51 +0200
changeset 208545 00ab79c7e6e0e77a22c591e36abdc55a44595251
parent 208544 457b4fd51bb28b243b45913085eaa84e2f7e7aeb
child 208546 f816a5b9c4cc80c682370dc5cf29f864c5aeaf2c
push idunknown
push userunknown
push dateunknown
reviewersme
bugs1065185
milestone35.0a1
Bug 1065185 - Create content arrays rather than chrome arrays in DOM Apps. r=me
dom/apps/Webapps.js
--- a/dom/apps/Webapps.js
+++ b/dom/apps/Webapps.js
@@ -607,31 +607,31 @@ WebappsApplication.prototype = {
         break;
       case "Webapps:ClearBrowserData:Return":
         this.removeMessageListeners(aMessage.name);
         Services.DOMRequest.fireSuccess(req, null);
         break;
       case "Webapps:Connect:Return:OK":
         this.removeMessageListeners(["Webapps:Connect:Return:OK",
                                      "Webapps:Connect:Return:KO"]);
-        let messagePorts = [];
+        let messagePorts = new this._window.Array();
         msg.messagePortIDs.forEach((aPortID) => {
           let port = new this._window.MozInterAppMessagePort(aPortID);
           messagePorts.push(port);
         });
         req.resolve(messagePorts);
         break;
       case "Webapps:Connect:Return:KO":
         this.removeMessageListeners(["Webapps:Connect:Return:OK",
                                      "Webapps:Connect:Return:KO"]);
         req.reject("No connections registered");
         break;
       case "Webapps:GetConnections:Return:OK":
         this.removeMessageListeners(aMessage.name);
-        let connections = [];
+        let connections = new this._window.Array();
         msg.connections.forEach((aConnection) => {
           let connection =
             new this._window.MozInterAppConnection(aConnection.keyword,
                                                    aConnection.pubAppManifestURL,
                                                    aConnection.subAppManifestURL);
           connections.push(connection);
         });
         req.resolve(connections);