comparison chrome/pageloader.js @ 198:59d4f04497dd

package into extension for profile, add direct file logging instead of stdout r=vlad
author Joel Maher <jmaher@mozilla.com>
date Tue, 05 Oct 2010 17:01:29 -0400
parents b4da709724e1
children 31249cbe4f19
comparison
equal deleted inserted replaced
197:b4da709724e1 198:59d4f04497dd
35 * the provisions above, a recipient may use your version of this file under 35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL. 36 * the terms of any one of the MPL, the GPL or the LGPL.
37 * 37 *
38 * ***** END LICENSE BLOCK ***** */ 38 * ***** END LICENSE BLOCK ***** */
39 39
40 const Cc = Components.classes; 40 try {
41 const Ci = Components.interfaces; 41 if (Cc === undefined) {
42 var Cc = Components.classes;
43 var Ci = Components.interfaces;
44 }
45 } catch (ex) {}
42 46
43 var NUM_CYCLES = 5; 47 var NUM_CYCLES = 5;
44 48
45 var pageFilterRegexp = null; 49 var pageFilterRegexp = null;
46 var reportFormat = "js"; 50 var reportFormat = "js";
369 } 373 }
370 374
371 if (content) 375 if (content)
372 content.removeEventListener('load', plLoadHandler, true); 376 content.removeEventListener('load', plLoadHandler, true);
373 377
378 if (MozillaFileLogger)
379 MozillaFileLogger.close();
380
374 goQuitApplication(); 381 goQuitApplication();
375 } 382 }
376 383
377 /* Returns array */ 384 /* Returns array */
378 function plLoadURLsFromURI(manifestUri) { 385 function plLoadURLsFromURI(manifestUri) {
446 453
447 return d; 454 return d;
448 } 455 }
449 456
450 function dumpLine(str) { 457 function dumpLine(str) {
458 if (MozillaFileLogger)
459 MozillaFileLogger.log(str + "\n");
451 dump(str); 460 dump(str);
452 dump("\n"); 461 dump("\n");
453 } 462 }