Closed Bug 29811 Opened 25 years ago Closed 24 years ago

JavaScript error srGetStrBundle on startup

Categories

(SeaMonkey :: General, defect, P3)

All
Mac System 8.5
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: sfraser_bugs, Assigned: bugs)

References

Details

Every time I start mozilla, I get this JavaScript error:

JavaScript Error: ReferenceError: srGetStrBundle is not defined
URL: chrome://navigator/content/navigator.js
LineNo: 24
Is this on mozilla or commercial tree and dbg or release build? Ay idea when it 
started to happen?

Thanks
This has been happening for a long time. It happens on any debug build (can't see 
the error in commercial).
Yup, I couldn't reproduce it with release builds. I recalled you logged a 
similar bug long time ago and it was fixed by leaf. The cause was that 
global/content/default/strres.js was not exported to dist/ on Mac.

Would you verified that if the file is there?

Thanks
navigator/locale/navigator.properties is present. Sorry, my previous comment 
should have read "can't see the error in non-debug)".

I suspect this is a threading/sync loading issue like we had before with
string bundles in the profile manager. The fix might be to move the 
srGetStrBundle() from where it is now, in a global JS location, into a function 
where it is called the first time it is used. That would make it happen later, 
which might work around the problem.
This shouldn't have to do with threading/sync issue. The error says the 
srGetxxx() function is not defined. I'd suspect strres.js is not included before
navigator.js.

My 2c
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.
Is this really a Browser General bug.  If not, could someone move it to the
correct Product/Component.  Thanks
*** Bug 30811 has been marked as a duplicate of this bug. ***
This is happening on Windows too. See, for example, the console output posted in 
bug 31020.
Hardware: Macintosh → All
Target Milestone: M15
Easy kill. hiddenWindow.xul needs to include strres.js:

Index: hiddenWindow.xul
===================================================================
RCS file: /cvsroot/mozilla/xpfe/global/resources/content/hiddenWindow.xul,v
retrieving revision 1.25
diff -b -c -2 -r1.25 hiddenWindow.xul
*** hiddenWindow.xul	1999/10/01 20:49:02	1.25
--- hiddenWindow.xul	2000/03/14 19:24:22
***************
*** 48,51 ****
--- 48,52 ----
  
    <!-- JS from navigator.xul, to handle the menu commands -->
+   <html:script language="javascript" src="chrome://global/content/strres.js" />
    <html:script language="javascript" src="chrome://navigator/content/
navigator.js"/>
  
Adding matt -- matt's use of srGetStrBundle in the help menu JS code is causing 
this error to crop up in other places too.
I checked in the fix for this.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified fixed with mac cvs build from 7/24/00 on Mac OS 9.  I don't see the
error in chrome://navigator/content/navigator.js
  However, I do see the error pop up in the console for
chrome://communicator/content/pref/pref-themes.js line 102: srGetStrBundle is
not defined
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.