Closed Bug 29807 Opened 25 years ago Closed 24 years ago

JavaScript error from charsetOverlay.js on startup

Categories

(Core :: Internationalization, defect, P3)

All
Mac System 8.5
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: sfraser_bugs, Assigned: sfraser_bugs)

References

Details

I get this error every time I start up:

JavaScript Error: TypeError: contentArea has no properties
URL: chrome://global/content/charsetOverlay.js
LineNo: 106
I don't see this on WinNT. Is it a mac-only bug? CC'ing Hyatt.
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.
*** Bug 30812 has been marked as a duplicate of this bug. ***
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.
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
Status: NEW → ASSIGNED
I checked in the above diff.
Assignee: cata → sfraser
Status: ASSIGNED → NEW
Fixed
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.