Closed Bug 48206 Opened 25 years ago Closed 23 years ago

Error in "chrome://communicator/content/tasksOverlay.js"

Categories

(SeaMonkey :: Passwords & Permissions, defect, P3)

x86
Windows 98

Tracking

(Not tracked)

RESOLVED WORKSFORME
mozilla0.9.9

People

(Reporter: numizmatyka, Assigned: morse)

Details

Attachments

(1 obsolete file)

1. In menu Tasks -> Tools select "JavaScript Console" 2. Run the mouse over "Privacy and Security" in the "Tasks" menu of JS console In the JS Console you see something like this: "Error: this.pref has no properties Source File: chrome://communicator/content/tasksOverlay.js Line: 228 Column: 0" There is no such error when runing the mouse over "Privacy and Security" in any other Mozilla window like navigator, mail etc.
I could reproduce the error. In file, mozilla/xpfe/components/console/resources/content/console.js, prefs are not defined while in mozilla/xpfe/browser/resources/content/navigator.js prefs are defined in the beginning (line: 34). Now the tasks menu is created using the same code from mozilla/xpfe/communicator/resources/content/tasksOverlay.js which uses prefs properties of the window object. I would suggest to define prefs properties to JS console window in console.js
Confirming for Mitesh.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Adding pref variable in the console.js will take care of this error. Copying the code from the navigator.js Index: console.js =================================================================== RCS file: /cvsroot/mozilla/xpfe/components/console/resources/content/console.js,v retrieving revision 1.10 diff -r1.10 console.js 44a45,58 > /* variable prefs > var pref = null; > try > { > pref = Components.classes["component://netscape/preferences"]; > if (pref) pref = pref.getService(); > if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); > } > catch (ex) > { > dump("failed to get prefs service!\n"); > pref = null; > } > */
This isn't a JavaScript Engine bug, moving to XP Apps for now and reassigning to default owner of the component. I wonder if we wouldn't be better off getting the service ourselves when we need it, instead of having a (fairly) hidden dependancy on a |var pref| existing.
Assignee: rogerl → vishy
Component: Javascript Engine → XP Apps
QA Contact: pschwartau → sairuh
unable to reproduce this on a current cvs build, linux. Is it still a bug?
works for me 20020117
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
I still see "this.pref" here: http://lxr.mozilla.org/seamonkey/source/extensions/wallet/resources/content/walletOverlay.js#187 I'm guessing this bug still exists but should be reassigned to morse@netscape.com for actual triage.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
-->wallet
Assignee: vishy → morse
Status: REOPENED → NEW
Component: XP Apps → Password Manager
QA Contact: sairuh → tpreston
Please ignore above patch. Posted to wrong bug report. Sorry.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
Attachment #65942 - Attachment is obsolete: true
This works for me. And it also works for gemal and aka according to the comments above. The only person who says it's still a problem is brade, and that's because she actually observed the symptom but because she saw "this.pref" in the file. However that's inside a try clause and so wouldn't produce an error. Therefore closing this out as wfm.
really closing out as wfm this time.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → WORKSFORME
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: