Closed Bug 719292 Opened 12 years ago Closed 12 years ago

Error: hud.jsterm is null in resource:///modules/HUDService.jsm:2074

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 12

People

(Reporter: ttaubert, Assigned: jwalker)

References

Details

Attachments

(1 file)

I tried to open the web console but nothing happened. The following was logged in the JS console:

Timestamp: 1/19/12 2:11:11 AM
Error: hud.jsterm is null
Source File: resource:///modules/HUDService.jsm
Line: 2074

HS.logConsoleAPIMessage() is failing here.
I just noticed that the console seems to have opened but was minimized (zero height). I can resize it and it seems to be working.
It's somehow working but in some kind of strange intermediate state. I can not close it.
Meh, I didn't see this error again but the strange console behavior and the minimized opening and not closing is the same even after restarting the browser. Maybe this should be a different bug.
It looks to me like this:

function formatResult(x) {
 return (typeof(x) == "string") ? x : hud.jsterm.formatResult(x);
}

Fails to take into account that gcliterm could be in use.

This is a common error, and there is lots of "if (hud.jsterm) { ... } else { ... }" around our code.

We've previously considered making jsterm and gcliterm be implementations of a similar interface, and been of the opinion that it possibly wasn't worth it, but I think it is.

Thoughts?
P.S. Thanks Tim.
(In reply to Joe Walker from comment #4)
> It looks to me like this:
> 
> function formatResult(x) {
>  return (typeof(x) == "string") ? x : hud.jsterm.formatResult(x);
> }
> 
> Fails to take into account that gcliterm could be in use.
> 
> This is a common error, and there is lots of "if (hud.jsterm) { ... } else {
> ... }" around our code.
> 
> We've previously considered making jsterm and gcliterm be implementations of
> a similar interface, and been of the opinion that it possibly wasn't worth
> it, but I think it is.
> 
> Thoughts?

At this point we should land a quick fix for the bug. Later we might consider making gcliterm more similar to jsterm, but that's still probably undecided given that GCLI might move into its own UI (the developer toolbar command line) - if I am not mistaken.
Assignee: nobody → jwalker
Priority: -- → P2
Target Milestone: --- → Firefox 12
Attached patch upload 1Splinter Review
Attachment #591787 - Flags: review?(mihai.sucan)
Comment on attachment 591787 [details] [diff] [review]
upload 1

Review of attachment 591787 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #591787 - Flags: review?(mihai.sucan) → review+
https://tbpl.mozilla.org/?tree=Fx-Team&rev=5e41076a67dd
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/a5d23f7e5cb5
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: