commit 2f753a57ea2fb8db0a1a0cc7d401a4db59f4ab98 Author: David Fifield david@bamsoftware.com Date: Thu Apr 10 00:51:35 2014 -0700
Use an event loop technique to block without a dialog. --- firefox/components/main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/firefox/components/main.js b/firefox/components/main.js index 43979e3..cff6ef0 100644 --- a/firefox/components/main.js +++ b/firefox/components/main.js @@ -68,9 +68,10 @@ MeekHTTPHelper.prototype = { dump("meek-http-helper: listen 127.0.0.1:" + serverSocket.port + "\n");
// Block forever. - var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] - .getService(Components.interfaces.nsIPromptService); - prompts.confirm(null, "Query", "Get down, get funky?"); + // https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Threads#Waiting_fo... + var thread = Components.classes["@mozilla.org/thread-manager;1"].getService().currentThread; + while (true) + thread.processNextEvent(true); } finally { var app = Components.classes["@mozilla.org/toolkit/app-startup;1"] .getService(Components.interfaces.nsIAppStartup);
tor-commits@lists.torproject.org