Closed Bug 318036 Opened 19 years ago Closed 19 years ago

adding to Array.prototype breaks a tree column picker

Categories

(Toolkit :: UI Widgets, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8.1

People

(Reporter: ryan, Assigned: ryan)

References

()

Details

(Keywords: fixed1.8.1)

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 The code to show a column picker is using the "in" keyword to iterate over an array, and any functions added to Array via Array.prototype are being iterated over as well, and the code is failing when it tries to document.getAnonymousElementByAttribute with a function. Reproducible: Always Steps to Reproduce: 1. See URL demostrating problem 2. Open the column picker 3. Click the "break column picker" button, which adds to Array.prototype 4. Open the column picker Actual Results: column picker stutters open Expected Results: column picker opens changing this not use the "in" keyword will solve the problem. A lot of javascript libraries add convienence functions to Array.prototype, so this is probably broken on many xul apps.
Attached file simple testcase
this is the sample that should be accessible at http://birdman.acceleration.net/ryan/treeProblems.xul
This is the same class of bug as https://bugzilla.mozilla.org/show_bug.cgi?id=309046, using the "in" keyword for iteration.
Attached file Not the right patch format, ignore (obsolete) —
Component: General → XUL Widgets
Product: Firefox → Toolkit
Version: unspecified → Trunk
Attachment #204371 - Attachment description: doesn't use "in" for iteration, uses good old "i" → Not the right patch format, ignore
Attachment #204371 - Attachment is obsolete: true
Attachment #204371 - Attachment is patch: false
Proper cvs diff against the head. (I think)
Attachment #204559 - Flags: second-review?
Attachment #204559 - Flags: first-review?
Comment on attachment 204559 [details] [diff] [review] cvs diff to fix this bug Tossing to mano, I'm on vacation until Monday
Attachment #204559 - Flags: second-review?
Attachment #204559 - Flags: first-review?(bugs.mano)
Attachment #204559 - Flags: first-review?
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: general → xul.widgets
Target Milestone: --- → mozilla1.9alpha1
Comment on attachment 204559 [details] [diff] [review] cvs diff to fix this bug r=mano.
Attachment #204559 - Flags: first-review?(bugs.mano) → first-review+
Since this passed review, can it please be checked in?
Yes, sorry about that, I will check it in later today.
Assignee: nobody → ryan
Whiteboard: [checkin needed]
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: PC → All
Checked in on the trunk. Thanks for the bug report and patch, Ryan! mozilla/toolkit/content/widgets/tree.xml; new revision: 1.24;
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Attachment #204559 - Flags: branch-1.8.1?(mconnor)
Attachment #204559 - Flags: approval-branch-1.8.1?(mconnor) → approval-branch-1.8.1+
Checked in on the 1.8 branch for Firefox 2. mozilla/toolkit/content/widgets/tree.xml; new revision: 1.21.2.1;
Keywords: fixed1.8.1
Target Milestone: mozilla1.9alpha1 → mozilla1.8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: