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

RESOLVED FIXED

Status

DevTools
General
RESOLVED FIXED
8 years ago
11 days ago

People

(Reporter: msucan, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

8 years ago
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.
(Reporter)

Updated

8 years ago
Blocks: 529086
Version: unspecified → Trunk
(Reporter)

Comment 1

8 years ago
Created attachment 457121 [details] [diff] [review]
proposed fix

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)

Comment 2

8 years ago
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 3

8 years ago
Comment on attachment 457121 [details] [diff] [review]
proposed fix

clearly some sloppy coding on my part. Thanks!
Attachment #457121 - Flags: review?(ddahl) → review+

Updated

8 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 4

8 years ago
Pushed:

http://hg.mozilla.org/users/ddahl_mozilla.com/heads-up-display/rev/b60630adbb1b
Status: NEW → RESOLVED
Last Resolved: 8 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)

Comment 7

8 years ago
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+
(Reporter)

Comment 9

8 years ago
Created attachment 457831 [details] [diff] [review]
patch + test code, for mozilla-central

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.
(Reporter)

Updated

8 years ago
Attachment #457831 - Flags: review?(dietrich) → review?(dtownsend)
Attachment #457831 - Flags: review?(dtownsend) → review+

Updated

8 years ago
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]
(Reporter)

Comment 12

8 years ago
Created attachment 458341 [details] [diff] [review]
[checked-in] rebased patch + test code

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
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED

Updated

8 years ago
Keywords: checkin-needed
Whiteboard: [needs rebase]

Updated

11 days ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.