More string indexing semantics issues
Maciej Stachowiak
mjs at apple.com
Wed Jun 25 18:36:59 PDT 2008
On Jun 25, 2008, at 2:33 PM, Garrett Smith wrote:
> On Wed, Jun 25, 2008 at 1:52 PM, Maciej Stachowiak <mjs at apple.com>
> wrote:
>>
>> I have not seen any reports of such problems. If it were common to
>> put
>> random numeric properties on String objects, I expect we would have
>> had a
>> bug report by now.
>>
>
> Why?
What I meant is this:
1) When Safari/WebKit/JavaScriptCore diverges from other browsers in
JavaScript behavior, in ways that Web content depends on, we have
historically gotten bug reports even when the issue is very obscure.
See my earlier comments about things like function declarations in
statement position for examples.
2) We have not gotten bug reports that involve a site breaking because
it set a low numeric property on a String object, and did not get the
expected value back. At least, none have been found to have this as
the cause. In other words, we have not seen cases like this:
var s = new String("abc");
s[0] = "expected";
if (s[0] != "expected")
alert("EPIC FAIL");
3) Therefore, I think it is unlikely that a lot of public Web content
depends on being able to do this. If this were at all common, odds are
that we would have heard about it by now. As Brendan suggests,
deploying the behavior in beta versions of other browsers would give
us more data points.
> Do you are there many Webkit only applications? Do these
> applications take advantage of string indexing via property access?
I do not think the existence of WebKit-only applications is relevant.
There are in fact a fair number (for example Dashboard widgets and
iPhone-specific Web apps), but they do not tell us anything about
whether public Web content at large depends on the behavior of
allowing any numeric property of a String object to be successfully
assigned. (I do not think any of this content depends on the WebKit
behavior either).
Regards,
Maciej
More information about the Es4-discuss
mailing list