From 7a528d180c2b9e7da58c7134fadcaec0569f17fc Mon Sep 17 00:00:00 2001 From: Mark Donnelly Date: Wed, 3 Dec 2014 16:42:41 -0500 Subject: [PATCH] Removed no longer needed console logging upon bootup. --- firefox/lib/main.js | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/firefox/lib/main.js b/firefox/lib/main.js index f38786e..8060a3d 100644 --- a/firefox/lib/main.js +++ b/firefox/lib/main.js @@ -1,20 +1,12 @@ var tabs = require("sdk/tabs"); const {Cu} = require("chrome"); -for (i = 0; i < 10; i++) { - console.log(""); -} - -console.log("About to load ctypes"); Cu.import("resource://gre/modules/ctypes.jsm"); -console.log(" ... loaded."); - -var json_gssapi; // TODO: detect which OS we're running, and proactively search for the // correct library name. -console.log("About to load libjsongssapi"); +var json_gssapi; try { json_gssapi = ctypes.open("libjsongssapi.so"); } @@ -23,25 +15,20 @@ catch (e) { json_gssapi = ctypes.open("libjsongssapi.dll"); } catch (e) { - console.log(" ... " + e); + console.log("Error loading the JSON GSS-API library: " + e); } } -console.log(" ... loaded."); -console.log("Declaring the call_gss function:"); -const gss_request = json_gssapi.declare("gss_request", +var gss_request = function(msg) { return "{\"error_message\":\"JSON GSS-API library was not loaded properly\"}"; } +try { +gss_request = json_gssapi.declare("gss_request", ctypes.default_abi, ctypes.char.ptr, ctypes.char.ptr); -console.log(" ... declared."); - -/* -console.log("Calling import_name"); -var reply; -reply = call_gss("{\"method\":\"gss_import_name\",\"arguments\":{\"input_name\":\"HTTP@localhost\",\"input_name_type\":\"{1 2 840 113554 1 2 1 4 }\"}}"); -console.log(" ... Reply: " + reply.readString()); -*/ - +} +catch (e) { + console.log("Could not find the function 'gss_request' in the JSON GSS-API library: " + e); +} var self = require("sdk/self"); var data = require("sdk/self").data; -- 2.1.4