Bug 32996 - [V8] Generate configuring of all named property getters/setters/enumerators.
Summary: [V8] Generate configuring of all named property getters/setters/enumerators.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dimitri Glazkov (Google)
URL:
Keywords:
Depends on:
Blocks: 32455 33031
  Show dependency treegraph
 
Reported: 2009-12-28 14:46 PST by Dimitri Glazkov (Google)
Modified: 2009-12-30 08:24 PST (History)
1 user (show)

See Also:


Attachments
Generate all configuring of named property handlers, v1. (11.51 KB, patch)
2009-12-28 15:15 PST, Dimitri Glazkov (Google)
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri Glazkov (Google) 2009-12-28 14:46:55 PST
Despite my best attempts, we still need 3 special cases for named property handling:

1) DOMWindow, because JS API in V8 is different from JSC. In V8, we have SetAccessCheckCallbacks method, which allows us to create special-purpose security checks. In JSC, we just use deleter and enumerator.

2) HTMLOptionsCollection, because it inherits from HTMLCollection. In JSC, named property handling comes free since JSHTMLOptionsCollection is generated to inherit from JSHTMLCollection. In V8, the generated classes are flat with static methods and thus don't provide this capability. The good news is that HTMLOptionsCollection shouldn't inherit from HTMLCollection per spec (http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#HTMLOptionsCollection), which means that this special-casing is temporary.

3) HTMLDocument, because the handling of document.all is completely different between JSC and V8. We really should fix this, but not as part of this patch.
Comment 1 Dimitri Glazkov (Google) 2009-12-28 15:15:06 PST
Created attachment 45577 [details]
Generate all configuring of named property handlers, v1.
Comment 2 WebKit Review Bot 2009-12-28 15:17:48 PST
style-queue ran check-webkit-style on attachment 45577 [details] without any errors.
Comment 3 Dimitri Glazkov (Google) 2009-12-28 15:37:44 PST
When committing, I'll need to add an extra line break to DerivedSourcesAllInOne.cpp to ensure that IncrediBuild-based builds (i.e. all Chromium/Win build bots) won't bork.

Also:

* Created bug 32997 to fix HTMLOptionsCollection.
* Created bug 32999 for document.all issue.
Comment 4 Adam Barth 2009-12-29 11:34:17 PST
Comment on attachment 45577 [details]
Generate all configuring of named property handlers, v1.

CodeGeneratorV8.pm still mystifies me, but this change looks reasonable.
Comment 5 Dimitri Glazkov (Google) 2009-12-30 08:24:50 PST
Landed as http://trac.webkit.org/changeset/52661.