Summary: | Classes should not override JSObject::toString(ExecState *) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||||||
Component: | WebCore JavaScript | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | ap, ggaren, sam | ||||||||
Priority: | P2 | ||||||||||
Version: | 420+ | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.4 | ||||||||||
Attachments: |
|
Description
mitz
2006-09-08 04:59:42 PDT
Created attachment 10454 [details]
Test matrix for an HTML element
This table shows the value of several expressions that (should) invoke ToString, ToPrimitive, [[DefaultValue]], and possibly toString and valueOf.
The table shows that, assuming it follows the spec, Firefox overrides [[DefaultValue]] so that when it's called without a hint, it does not invoke valueOf.
Classes that currently override JSObject::toString() are DOMObject, DOMNode, JSHTMLElement, Window, FrameArray, Location, Selection and History.
Created attachment 13473 [details]
Unfinished patch
Created attachment 14815 [details]
updated patch
Comment on attachment 14815 [details]
updated patch
Geoff gave me the thumbs up on this baby!
|