Bug 55220 - Web Inspector: "length" getter is invoked upon console object formatting.
Summary: Web Inspector: "length" getter is invoked upon console object formatting.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-02-25 08:21 PST by Pavel Feldman
Modified: 2011-03-09 01:54 PST (History)
10 users (show)

See Also:

Patch (5.38 KB, patch)
2011-02-25 08:57 PST, Pavel Feldman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2011-02-25 08:21:18 PST
Enter 'demo = {get length () {return this.a.length;}}' and submit.
Read error "TypeError: Cannot read property 'length' of undefined".

Reason is that array detection in the formatting code checks the length value. We should probably switch to testing whether length is enumerated instead.
Comment 1 Pavel Feldman 2011-02-25 08:57:42 PST
Created attachment 83819 [details]
Comment 2 Pavel Feldman 2011-03-09 01:54:20 PST
Comment on attachment 83819 [details]

Clearing flags on attachment: 83819

Committed r80628: <http://trac.webkit.org/changeset/80628>
Comment 3 Pavel Feldman 2011-03-09 01:54:28 PST
All reviewed patches have been landed.  Closing bug.