Bug 773164: remove social frameworker load listener. r=gavin
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 16 Jul 2012 11:59:37 +1000
changeset 102120 27e4b9cbed7438d797e85864ffe2c26fb9f50ec0
parent 102119 66a9604f532679a43c53dbe3444a6ffa3629fb2d
child 102121 777fbc99f40b42de16f7577c56503b23f0121fd6
push idunknown
push userunknown
push dateunknown
reviewersgavin
bugs773164
milestone16.0a1
Bug 773164: remove social frameworker load listener. r=gavin
toolkit/components/social/FrameWorker.jsm
--- a/toolkit/components/social/FrameWorker.jsm
+++ b/toolkit/components/social/FrameWorker.jsm
@@ -131,16 +131,17 @@ FrameWorker.prototype = {
       return new workerWindow.Uint8Array(a);
     };
 
     this.sandbox = sandbox;
 
     let worker = this;
 
     workerWindow.addEventListener("load", function loadListener() {
+      workerWindow.removeEventListener("load", loadListener);
       // the iframe has loaded the js file as text - first inject the magic
       // port-handling code into the sandbox.
       function getProtoSource(ob) {
         let raw = ob.prototype.toSource();
         return ob.name + ".prototype=" + raw + ";"
       }
       try {
         let scriptText = [importScripts.toSource(),