Closed Bug 51661 Opened 25 years ago Closed 17 years ago

js errors in navigator.js when clicking Leak Detector menuitems [leakDetector.* is not a function]

Categories

(SeaMonkey :: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.0a2

People

(Reporter: stdowa+bugzilla, Assigned: sgautherie)

References

Details

Attachments

(1 file, 3 obsolete files)

using 2000090608 on win2k i get the following errors when clicking on the menuitems under the QA -> Leak Detector menu: Dump Memory Leaks -> Error: leakDetector.vtable has no properties Source File: chrome://navigator/content/navigator.js Line: 1546 Trace Chrome -> Error: leakDetector.vtable has no properties Source File: chrome://navigator/content/navigator.js Line: 1552 Trace Document -> Error: leakDetector.vtable has no properties Source File: chrome://navigator/content/navigator.js Line: 1559
I wrote this stuff, and it currently isn't implemented on Windows. Sorry for the confusion.
Assignee: don → beard
Status: NEW → ASSIGNED
Priority: P3 → P5
Target Milestone: --- → Future
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 I just discovered that my Mozilla 1.7 final doesn't have the QA menuitem. Is this perhaps only available in nigtly builds?
warpozio@yahoo.com: generally speaking (there's no guarantee that someone releases without the menus, but they try to). fwiw this is trivial to fix, if you're interested in helping, someone on irc.mozilla.org #developers would gladly help you work on it. note that the actual items that will fail today are slightly different from when this bug was filed, but the fix is still the same: namely adding: if (!("functionToCall" in leakDetector)) return; before: leakDetector.functionToCall();
Assignee: beard → guifeatures
Status: ASSIGNED → NEW
Component: XP Apps → XP Apps: GUI Features
QA Contact: bugzilla
To check the leak detector I installed a 1.8 alpha build. It is now under Debug (not QA). Clicking any of the 4 options (Dump Memory Leaks, Trace Chrome, Trace Document, verbose) didn't do anything... No action, no window, but no crash either...
I didn't add another check for traceObject() in traceDocument() because AFAIK we always get all or nothing, depending on whether GC_LEAK_DETECTOR is defined.
Attachment #155423 - Flags: review?(neil.parkwaycc.co.uk)
This is not exactly the nicest code... personally I'd like leakDetector to be the actual XPCOM object, if it exists, as this could then be easily compared for, although a second global would be necessary to track the verbosity.
I found the patch ugly myself but the problem is I can't build with LeakDetector enabled and thus can't check whether this works. Instead of flying blind I decided to follow the suggestion in comment #3.
Attachment #155423 - Attachment is obsolete: true
Attachment #155432 - Flags: review?(neil.parkwaycc.co.uk)
This is looking good. But it occurs to me that we could alternatively disable the entire leak detector menu if it is not found. Anyway, I'll just see if I can build with the leak detector, to make sure the patch works when it's there :-)
I have a patch where I simply remove the menu and the separator above it if the leak detector is not there. But it adds a few lines and in the meantime I've found bug 236029 where timeless suggests not to bloat the code over this issue?
so i'm inconsistent. sorry :) remember, neil is module owner, i just express opinions at times based on my mood. i think a single broadcaster or equivalent that causes the items to be hidden when it's unavailable is probably best. -- note that this doesn't really relate to the other issue you're trying to address.
Comment on attachment 155432 [details] [diff] [review] make leakDetector the XPCOM object Hmm... so if I understand correctly, that leak detector only runs on the Mac anyway, so someone with a mac should test this.
Attachment #155432 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attached patch Revised patch. (obsolete) — Splinter Review
That last patch was broken, Boolean("false") returns true...
Attachment #155432 - Attachment is obsolete: true
Attachment #155423 - Flags: review?(neil.parkwaycc.co.uk)
*** Bug 265444 has been marked as a duplicate of this bug. ***
Referring to Comment #11. If the leakdetector only runs on Mac? Why is the OS then marked as Windows 2000?
Just tested this patch on Mac. The menu items remain, but the they don't do anything, nor do they cause Javascript errors any more.
Product: Core → Mozilla Application Suite
Attachment #155555 - Flags: review?(neil.parkwaycc.co.uk)
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a6) Gecko/20050111] (release) (W98SE) Bug still there.
Blocks: 236029
Summary: js errors when clicking Leak Detector menuitems → js errors in navigator.js when clicking Leak Detector menuitems [leakDetector.* is not a function]
*** Bug 236029 has been marked as a duplicate of this bug. ***
No longer blocks: 236029
*** Bug 322328 has been marked as a duplicate of this bug. ***
I get with cvs HEAD (seamonkey/suite) build the following on linux-i686: JavaScript error: chrome://debugqa/content/debugQAMenuOverlay.js, line 66: leakDetector.dumpLeaks is not a function [Thread 0xb09ebb90 (LWP 1106) exited]
Filter "spam" on "guifeatures-nobody-20080610".
Assignee: guifeatures → nobody
QA Contact: guifeatures
Component: XP Apps: GUI Features → UI Design
(In reply to comment #19) [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b2pre) Gecko/20081014 SeaMonkey/2.0a2pre] (nightly) (W2Ksp4) and [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b2pre) Gecko/20081012 SeaMonkey/2.0a2pre] (home, optim default) (W2Ksp4) with |ac_add_options --enable-logrefcnt| Error update { Error: leakDetector.dumpLeaks is not a function Source File: chrome://debugqa/content/debugQAMenuOverlay.js Line: 66 Error: leakDetector.traceObject is not a function Source File: chrome://debugqa/content/debugQAMenuOverlay.js Line: 72 Error: leakDetector.markObject is not a function Source File: chrome://debugqa/content/debugQAMenuOverlay.js Line: 79 }
Severity: normal → minor
Component: UI Design → General
Keywords: helpwanted
Priority: P5 → --
QA Contact: ui-design → general
Target Milestone: Future → seamonkey2.0a2
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b2pre) Gecko/20081014 SeaMonkey/2.0a2pre] (nightly) (W2Ksp4) Per comment 8.
Assignee: nobody → sgautherie.bz
Attachment #155555 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #343154 - Flags: superreview?(neil)
Attachment #343154 - Flags: review?(neil)
Attachment #155555 - Flags: review?(neil)
Attachment #343154 - Flags: superreview?(neil)
Attachment #343154 - Flags: superreview+
Attachment #343154 - Flags: review?(neil)
Attachment #343154 - Flags: review+
Attachment #343154 - Attachment description: (Cv1) Hide the menu → (Cv1) Hide the menu [Checkin: Comment 23]
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
OS: Windows 2000 → All
Hardware: PC → All
Resolution: --- → FIXED
Blocks: 451291
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: