Bug 34211 - [V8] Support getting integer-named properties using indexing notation on document object
Summary: [V8] Support getting integer-named properties using indexing notation on docu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-27 05:06 PST by Mads Ager
Modified: 2010-01-27 12:00 PST (History)
3 users (show)

See Also:


Attachments
Add indexed property getter to HTMLDocument objects (4.50 KB, patch)
2010-01-27 05:19 PST, Mads Ager
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mads Ager 2010-01-27 05:06:53 PST
The V8 binding layer does not handle access of properties with integer names on HTMLDocuments as illustrated by the following example.  We need to add an indexed property getter to HTMLDocuments.

<html>
<head>
<script>
function runTest()
{
    alert(document['42']);
    alert(document[42]);
}
</script>
</head>
<body onload="runTest()">
    <img name="42" src="foo.gif">
</body>
</html>
Comment 1 Mads Ager 2010-01-27 05:07:17 PST
Corresponding Chromium bug: crbug.com/31662
Comment 2 Mads Ager 2010-01-27 05:19:12 PST
Created attachment 47520 [details]
Add indexed property getter to HTMLDocument objects
Comment 3 Dimitri Glazkov (Google) 2010-01-27 08:42:12 PST
Nate, you want to give it a look-over?
Comment 4 Nate Chapin 2010-01-27 09:13:27 PST
(In reply to comment #3)
> Nate, you want to give it a look-over?

LGTM
Comment 5 Dimitri Glazkov (Google) 2010-01-27 09:19:22 PST
Comment on attachment 47520 [details]
Add indexed property getter to HTMLDocument objects

I wonder if we should just generate fallback index getters for all interfaces that have named property getters?
Comment 6 WebKit Commit Bot 2010-01-27 12:00:23 PST
Comment on attachment 47520 [details]
Add indexed property getter to HTMLDocument objects

Clearing flags on attachment: 47520

Committed r53946: <http://trac.webkit.org/changeset/53946>
Comment 7 WebKit Commit Bot 2010-01-27 12:00:29 PST
All reviewed patches have been landed.  Closing bug.