Closed Bug 344545 Opened 18 years ago Closed 18 years ago

DOM Inspector 1.8.1b1 Leak (dom.js)

Categories

(Other Applications :: DOM Inspector, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: LouCypher, Assigned: sdwilsh)

Details

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b1) Gecko/20060710 Firefox/2.0b1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b1) Gecko/20060710 Firefox/2.0b1 - Build ID: 2006071020

Clean profile

Reproducible: Always

Steps to Reproduce:
1. Run Firefox
2. Open Error Console
3. Run DOM Inspector
4. From DOM Inspector window, click the "Select Element By Click" button.
5. Close DOM Inspector without selecting any object/element.

Actual Results:  
Error Console will display:

Error: viewer is not defined
Source File: chrome://inspector/content/viewers/dom/dom.js
Line: 1005



Error Console will continue to display the error message until the inspected document/window is closed.
On prior version of Firefox (with patched DOMI from bug 3366961) where Leak Monitor is installed and running, Leak Monitor will report memory leaks (see next attachment).

Solution:
Modify dom.js and edit function DOMViewer_destroy() to:

  PrefUtils.removeObserver("inspector", PrefChangeObserver);
+ try {
+   viewer.removeClickListeners();
+ } catch(ex) {
+ }
  viewer = null;
Attached file Leak Monitor report
Patches accepted, Lou :)
Attached patch v1 (obsolete) — Splinter Review
Can someone see if this takes care of it (ie the reporter)?  I don't have the extension installed.  If this works, I'll request review.
any takers on the whole testing thing?
Attachment #230745 - Flags: review?(db48x)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee: dom-inspector → comrade693+bmo
Status: ASSIGNED → NEW
Comment on attachment 230745 [details] [diff] [review]
v1

r=db48x
Attachment #230745 - Flags: review?(db48x) → review+
Unless you can give me steps to reproduce an exception removing the click listeners, I'd only give you sr+ without the try/catch.
Attached patch v1.1Splinter Review
Can't figure out why we need the try catch block - no exceptions thrown.
Attachment #230745 - Attachment is obsolete: true
Attachment #251398 - Flags: superreview?(neil)
Attachment #251398 - Flags: review?(db48x)
Comment on attachment 251398 [details] [diff] [review]
v1.1

r=db48x
Attachment #251398 - Flags: review?(db48x) → review+
Attachment #251398 - Flags: superreview?(neil) → superreview+
Whiteboard: [checkin needed]
Checked in by timeless.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: