Bug 802929 - use existing port handle for socialcookies-get message. r=jaws,mixedpuppy
authorFelipe Gomes <felipc@gmail.com>
Thu, 18 Oct 2012 16:40:12 +1100
changeset 110767 fdd5c75c14f2e5b79e7505d0232d18612e7edaf3
parent 110766 87df09bc5e8e44547fd1669ae04580326c4c935c
child 110768 b872b207397dc5c15ad9db923b4d242e41630893
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersjaws, mixedpuppy
bugs802929
milestone19.0a1
Bug 802929 - use existing port handle for socialcookies-get message. r=jaws,mixedpuppy
toolkit/components/social/WorkerAPI.jsm
--- a/toolkit/components/social/WorkerAPI.jsm
+++ b/toolkit/components/social/WorkerAPI.jsm
@@ -58,18 +58,17 @@ WorkerAPI.prototype = {
     },
     "social.user-profile": function (data) {
       this._provider.updateUserProfile(data);
     },
     "social.ambient-notification": function (data) {
       this._provider.setAmbientNotification(data);
     },
     "social.cookies-get": function(data) {
-      let document = getFrameWorkerHandle(this._provider.workerURL, null).
-                        _worker.frame.contentDocument;
+      let document = this._port._window.document;
       let cookies = document.cookie.split(";");
       let results = [];
       cookies.forEach(function(aCookie) {
         let [name, value] = aCookie.split("=");
         results.push({name: unescape(name.trim()),
                       value: unescape(value.trim())});
       });
       this._port.postMessage({topic: "social.cookies-get-response",