Bug 60937 - SunSpider: string-validate-input.js uses an undeclared variable named 'name', which is a DOM API
Summary: SunSpider: string-validate-input.js uses an undeclared variable named 'name',...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Maciej Stachowiak
Depends on:
Reported: 2011-05-16 17:44 PDT by Geoffrey Garen
Modified: 2011-07-02 13:57 PDT (History)
3 users (show)

See Also:

Patch (1.41 KB, patch)
2011-07-02 13:53 PDT, Maciej Stachowiak
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2011-05-16 17:44:36 PDT
Here's the code:

      name = makeName(6);

Since 'name' is undeclared, and window.name defaults to the DOM frame name API, this test spends a bunch of time getting and setting the name of the frame in the DOM.

Of course we want the DOM to be fast, but testing the DOM seems contrary to the goals of SunSpider.
Comment 1 Alexey Proskuryakov 2011-05-16 23:18:45 PDT
This is fixed in a r-'ed patch attached to bug 17634, although with a slightly different rationale.
Comment 2 Geoffrey Garen 2011-05-17 16:57:24 PDT
It looks like Maciej planned to fix this, but never got around to it.

I think the important issue is to pick a name that doesn't conflict with a DOM API. Whether the variable is declared as a var or not is no big deal.
Comment 3 Maciej Stachowiak 2011-07-02 13:53:49 PDT
Created attachment 99560 [details]
Comment 4 Maciej Stachowiak 2011-07-02 13:57:46 PDT
Committed r90318: <http://trac.webkit.org/changeset/90318>