| Index: tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js
|
| ===================================================================
|
| --- tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js (revision 13269)
|
| +++ tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js (working copy)
|
| @@ -72,11 +72,16 @@
|
| if (consoleService) {
|
| consoleService.registerListener(consoleListener);
|
| }
|
| + // Add the handler for hooking in to each page's DOM. This handler
|
| + // is for each "gBrowser", representing a tab/window.
|
| + window.getBrowser().addEventListener("load", onPageLoad, true);
|
| }
|
|
|
| // Stop collecting console messages.
|
| function shutdown(event) {
|
| + window.getBrowser().removeEventListener("load", onPageLoad);
|
| consoleService.unregisterListener(consoleListener);
|
| + ConsoleCollector.clear();
|
| }
|
|
|
| // Hook the ConsoleCollector into the DOM as window.ConsoleCollector.
|
| @@ -87,9 +92,6 @@
|
| }
|
| };
|
|
|
| - // Add the handler for hooking in to each page's DOM. This handler
|
| - // is for each "gBrowser", representing a tab/window.
|
| - window.getBrowser().addEventListener("load", onPageLoad, true);
|
| // Add the handlers to initialize the add-on and shut it down.
|
| // These handlers are for the application as a whole.
|
| window.addEventListener('load', initialize, false);
|
|
|