If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

JavaScript error from charsetOverlay.js on startup

VERIFIED FIXED in M15

Status

()

Core
Internationalization
P3
normal
VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: Simon Fraser, Assigned: Simon Fraser)

Tracking

Trunk
All
Mac System 8.5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

18 years ago
I get this error every time I start up:

JavaScript Error: TypeError: contentArea has no properties
URL: chrome://global/content/charsetOverlay.js
LineNo: 106

Comment 1

18 years ago
I don't see this on WinNT. Is it a mac-only bug? CC'ing Hyatt.
(Assignee)

Comment 2

18 years ago
This bug is now much more apparent (and will show up in optimized builds) now 
that JS errors cause an alert to be displayed to the user.

Comment 3

18 years ago
*** Bug 30812 has been marked as a duplicate of this bug. ***

Comment 4

18 years ago
cata- please mark this as ASSIGN. 
pinkerton- is that true we create one more appcore to hold the "application menu 
bar" on Mac? When I help cata to trace this problem, we see the 
charsetOverlay.js get load twice when it bring up the first window. Only the 
first loading have this problem. Then, if I open a new window, it will load 
charsetOverlay.js once but not twice. This make me guess that we load the 
charsetOverlay.js for the menu bar on the startup for the application menu which 
do not have the 'appcontent'. If that is the case, maybe we should add 
change 106 from 
contentArea.addEventListener("load", charsetLoadListener, true);
to 
if(contentArea)
   contentArea.addEventListener("load", charsetLoadListener, true);

i'm unfamiliar with the issues involved. cc'ing saari who might know.
(Assignee)

Comment 6

18 years ago
Another easy kill. The error comes from hiddenWindow.xul, which has no element 
with id="appconent". This diff should fix it:

Index: charsetOverlay.js
===================================================================
RCS file: /cvsroot/mozilla/xpfe/global/resources/content/charsetOverlay.js,v
retrieving revision 1.5
diff -w -c -1 -r1.5 charsetOverlay.js
*** charsetOverlay.js	2000/02/23 00:00:26	1.5
--- charsetOverlay.js	2000/03/14 19:31:19
***************
*** 104,106 ****
  
! contentArea = window.document.getElementById("appcontent")
  contentArea.addEventListener("load", charsetLoadListener, true);
--- 104,107 ----
  
! contentArea = window.document.getElementById("appcontent");
! if (contentArea)
    contentArea.addEventListener("load", charsetLoadListener, true);
Target Milestone: M15

Updated

18 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 7

18 years ago
I checked in the above diff.
Assignee: cata → sfraser
Status: ASSIGNED → NEW
(Assignee)

Comment 8

18 years ago
Fixed
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 9

18 years ago
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.