Closed Bug 578437 Opened 14 years ago Closed 14 years ago

The HUD console fails to re-attach the window.console object after page reload.

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: msucan, Unassigned)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.6.30 Version/10.60
Build Identifier: 

The window.console API is not available after page reload, even if the HUD console is open.

Reproducible: Always

Steps to Reproduce:
- Open a web page that uses the window.console API.
- Open the HUD console.
- Try from the web page to access window.console. It should work - the window.console API is attached when the HUD console is displayed.
- Reload the web page and try to use the window.console API again.
Actual Results:  
The window.console property is undefined.

Expected Results:  
The window.console API should be available.
Blocks: 529086
Version: unspecified → Trunk
Attached patch proposed fix (obsolete) — Splinter Review
This fixes the issue reported. The HUDService.windowInitializer() uses the HeadsUpDisplay.console() getter when the web page is reloaded, but that getter did not return any value.
Attachment #457121 - Flags: review?(ddahl)
If you type "console" after reloading, it is indeed available, and all of the messages that come from listeners, etc, have access to the window's console. This is related to the sandbox bug i think: bug 572953

CCing mrbkap
Comment on attachment 457121 [details] [diff] [review]
proposed fix

clearly some sloppy coding on my part. Thanks!
Attachment #457121 - Flags: review?(ddahl) → review+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Pushed:

http://hg.mozilla.org/users/ddahl_mozilla.com/heads-up-display/rev/b60630adbb1b
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
reopening. This isn't in mozilla-central.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 457121 [details] [diff] [review]
proposed fix

requesting review to get this fix checked in.
Attachment #457121 - Flags: review?(dtownsend)
crap. sorry about closing this bug. what was I thinking?
Comment on attachment 457121 [details] [diff] [review]
proposed fix

This code seems fine however I think you should add an automated test before landing
Attachment #457121 - Flags: review?(dtownsend) → review+
I have updated the patch now to include test code for the issue. This patch applies cleanly only on the mozilla-central default branch.
Attachment #457121 - Attachment is obsolete: true
Attachment #457831 - Flags: review?(dietrich)
we should let mossop review this since he did the first round.
Attachment #457831 - Flags: review?(dietrich) → review?(dtownsend)
Attachment #457831 - Flags: review?(dtownsend) → review+
Keywords: checkin-needed
this doesn't apply cleanly and there are some contradictions in the patch and what's in browser_HUDServiceTestsAll.js.

Please fix!
Whiteboard: [needs rebase]
rebased patch for mozilla-central as of now.
Attachment #457831 - Attachment is obsolete: true
Comment on attachment 458341 [details] [diff] [review]
[checked-in] rebased patch + test code

changeset:   47925:a80066930eb5
tag:         tip
user:        Mihai Sucan <robodesign@gmail.com>
date:        Mon Jul 19 12:15:21 2010 -0300
summary:     bug 578437 - The HUD console fails to re-attach the window.console object after page reload, r=mossop
Attachment #458341 - Attachment description: rebased patch + test code → [checked-in] rebased patch + test code
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Keywords: checkin-needed
Whiteboard: [needs rebase]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: