Closed Bug 586226 Opened 14 years ago Closed 13 years ago

Errors show up in the wrong WebConsole

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julian.viereck, Unassigned)

References

Details

When you have two tabs with the same url and an error occurred in tab 2, the error is displayed in the WebConsole of tab 1.

This is caused by the fact that sometimes the hud to log to is figured out by the url but if there are two pages with the same url, this doesn't work out.
This bug is caused by the global HUDConsoleObserver which routes messages to the HUDService.logConsoleActivity() method, which in turn uses the first HeadsUpDisplay object associated with the page URL. This causes an error, because the first HUD object is not always the originating tab for that HUD.

The logic in logConsoleActivity() needs to be changed, maybe we should go for window IDs.
(In reply to comment #1)
> This bug is caused by the global HUDConsoleObserver which routes messages to
> the HUDService.logConsoleActivity() method, which in turn uses the first
> HeadsUpDisplay object associated with the page URL. This causes an error,
> because the first HUD object is not always the originating tab for that HUD.
> 
> The logic in logConsoleActivity() needs to be changed, maybe we should go for
> window IDs.

Or,for now we just change the logic so that it logs things to both consoles. We do not have the review bandwidth to make huge changes right now. In my opinion, routing the message to both consoles is not so bad, as long as we notate this inthe code with a TODO and file a followup bug.
> (In reply to comment #1)
> > The logic in logConsoleActivity() needs to be changed, maybe we should go for
> > window IDs.

this actually won't help at all, since the only thing we have to go on is the url, the window id is still as meaningless as the hudId. This is why we need  the consoleService to pass along the window id with the error.
Erm, yeah. The Window ID can be used only if we have it, or if we have the window object. But... from the consoleService we can't get that.

I agree we can't make big changes, so displaying the errors in both HUDs for both tabs wouldn't be a big problem.
Whiteboard: [kd4b6]
Whiteboard: [kd4b6]
This was fixed by a collection of bugs handled by Mihai that associated window IDs with log statements all over the place.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.