Closed Bug 332797 Opened 19 years ago Closed 18 years ago

Erroneous tree.columns[0] undefined property warning

Categories

(Core :: XUL, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: andrew)

Details

Attachments

(1 file, 1 obsolete file)

Although tree.columns[0] correctly returns the leftmost column a undefined property strict JavaScript warning is logged in the JavaScript console.
This happens because nsGenericArraySH::NewResolve does this: if (!JS_GetProperty(cx, obj, "length", &lenval)) { return NS_ERROR_UNEXPECTED; } but the property is called count and not length.
I now have a patch for this, which makes a new attribute, length, which is an alias of count. I am still testing this, but if all goes well, will post the patch shortly.
Attachment #232978 - Flags: review?(neil)
Attached patch As before, but bumps IID (deleted) — Splinter Review
Attachment #232978 - Attachment is obsolete: true
Attachment #233000 - Flags: review?(neil)
Attachment #232978 - Flags: review?(neil)
Comment on attachment 233000 [details] [diff] [review] As before, but bumps IID I can't get to this this week so trying Enn instead.
Attachment #233000 - Flags: review?(neil) → review?(enndeakin)
Comment on attachment 233000 [details] [diff] [review] As before, but bumps IID Looks OK, but get a DOM person to sr it as well.
Attachment #233000 - Flags: review?(enndeakin) → review+
Attachment #233000 - Flags: superreview?(bzbarsky)
Comment on attachment 233000 [details] [diff] [review] As before, but bumps IID sr=jst
Attachment #233000 - Flags: superreview?(bzbarsky) → superreview+
Checking in layout/xul/base/src/tree/src/nsTreeColumns.cpp; /cvsroot/mozilla/layout/xul/base/src/tree/src/nsTreeColumns.cpp,v <-- nsTreeColumns.cpp new revision: 1.16; previous revision: 1.15 done Checking in layout/xul/base/src/tree/public/nsITreeColumns.idl; /cvsroot/mozilla/layout/xul/base/src/tree/public/nsITreeColumns.idl,v <-- nsITreeColumns.idl new revision: 1.4; previous revision: 1.3 done
Assignee: Jan.Varga → ak.miller
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: xptoolkit.trees → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: