Bug 60937

Summary: SunSpider: string-validate-input.js uses an undeclared variable named 'name', which is a DOM API
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: Tools / TestsAssignee: Maciej Stachowiak <mjs>
Severity: Normal CC: ap, mjs, psolanki
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch mitz: review+

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>