Closed Bug 1096858 Opened 10 years ago Closed 9 years ago

Browser console doesn't report all messages reported before a window close

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1107699

People

(Reporter: standard8, Unassigned)

References

Details

Adding logging on Loop, we frequently want to check things are happening before a window.close() call.

When doing this, however, the messages aren't displayed on the browser console - they never show up.

Approximate STR would be to open a chat window, and in the page loaded have some code such as:

 console.log("test");
 window.close();

If I put the window.close() in a setTimeout, then the log output happens.
Could this be because we use a timer to queue console.log calls?
Flags: needinfo?(amarchesini)
(In reply to Panos Astithas [:past] (overloaded, please needinfo) from comment #1)
> Could this be because we use a timer to queue console.log calls?

Correct. Here is the code:

https://mxr.mozilla.org/mozilla-central/source/dom/base/Console.cpp#589

What we do here is that, when the window is closed we clear the list of pending console messages.
We can change the code, but I prefer to have the patch for bug 1058644 landed before.
Depends on: 1058644
Flags: needinfo?(amarchesini)
Alright, that makes sense.
Component: Developer Tools: Console → DOM
Product: Firefox → Core
We fixed this issue in bug 1107699.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.