rem: } return found; 
add: } return found; 
context: (function() {const consoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces["nsIConsoleService"]);this.initializeTrace = function(context){    if (FBTrace.dumpToPanel && context)    {        FBTrace.sysout = function(msg) {            var noThrottle = true;            Firebug.TraceModule.log(msg, context, "info", FirebugReps.Text, noThrottle);        }        dump("trace.initializeTrace Set to panel\n");    }    else    {        FBTrace.sysout = function(msg)        {            dump(msg);        }        dump("trace.initializeTrace Set to stdout for context="+context+"\n");    }}this.dumpToPanel = false;this.dumpProperties = function(header, obj){    try {        var noThrottle = true;        this.sysout(header+" sees object with typeof: \'"+typeof(obj)+"\'; object contains:\n");        if (obj instanceof Array)        {            if (FBTrace.dumpToPanel && FirebugContext)                return Firebug.TraceModule.log(obj, FirebugContext, "info", FirebugReps.Array, noThrottle);            for (var p = 0; p < obj.length; p++)            {                try                {                    this.sysout("["+p+"]="+obj[p]+";\n");                }                catch (e)                {                    this.sysout("dumpProperties failed:"+e+"\n");                }            }        }        else if (typeof(obj) == 'string')        {            if (FBTrace.dumpToPanel && FirebugContext)                return Firebug.TraceModule.log(obj, FirebugContext, "info", FirebugReps.Text, noThrottle);            this.sysout(obj+"\n");        }        //else if (obj.name && obj.name == 'NS_ERROR_XPC_JS_THREW_JS_OBJECT')        //{        //        //}        else        {            if (FBTrace.dumpToPanel && FirebugContext)                return Firebug.TraceModule.log(obj, FirebugContext, "info", FirebugReps.Obj, noThrottle);            for (var p in obj)            {				if (p.match("QueryInterface"))				{					if (this.dumpInterfaces(obj))						continue;					else						this.sysout("dumpInterfaces found NONE\n");				}                try                {                    this.sysout("["+p+"]="+obj[p]+";\n");                }                catch (e)                {                    this.sysout("dumpProperties failed:"+e+"\n");                }            }        }    }    catch(exc)    {        this.dumpStack("dumpProperties failed:"+exc+" trying with header="+header);    }},this.dumpInterfaces = function(obj){	var found = false;	// could try for classInfo	for(iface in Components.interfaces)	{		if (obj instanceof Components.interfaces[iface])		{			found = true;			for (p in Components.interfaces[iface])			{				this.sysout("["+iface+"."+p+"]="+obj[p]+";\n");			}		}	}	return found;},this.consoleOut = function(text){    consoleService.logStringMessage(text + "");},this.dumpStack = function(optional_header) {    if (optional_header)        this.sysout(optional_header + "\n");    this.sysout(this.getComponentsStack(2));    this.sysout("\n");}this.getComponentsStack = function(strip){    var lines = [];    for (var frame = Components.stack; frame; frame = frame.caller)        lines.push(frame.filename + " (" + frame.lineNumber + ")");    if (strip)        lines.splice(0, strip);    return lines.join("\n");};// ************************************************************************************************this.initializeTrace();}).apply(FBTrace);
meta: 7450	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/7450/f21938f9c12477d5e72da0bab04d18fd1e717898/trace.js/clean/extension/content/firebug/trace.js