[webkit-reviews] review granted: [Bug 26882] Speed up creation of V8 wrappers for DOM nodes : [Attachment 32373] Uploaded updated version

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 7 09:15:15 PDT 2009


Darin Fisher (:fishd, Google) <fishd at chromium.org> has granted anton muhin
<antonm at chromium.org>'s request for review:
Bug 26882: Speed up creation of V8 wrappers for DOM nodes
https://bugs.webkit.org/show_bug.cgi?id=26882

Attachment 32373: Uploaded updated version
https://bugs.webkit.org/attachment.cgi?id=32373&action=edit

------- Additional Comments from Darin Fisher (:fishd, Google)
<fishd at chromium.org>
>Index: bindings/v8/V8Proxy.cpp

>+static const V8ClassIndex::V8WrapperType mapping[] = {
>+    V8ClassIndex::INVALID_CLASS_INDEX,    // NONE
>+    V8ClassIndex::INVALID_CLASS_INDEX,    // ELEMENT_NODE needs special
treatment
>+    V8ClassIndex::ATTR,		    // ATTRIBUTE_NODE
>+    V8ClassIndex::TEXT,		    // TEXT_NODE
>+    V8ClassIndex::CDATASECTION,	    // CDATA_SECTION_NODE
>+    V8ClassIndex::ENTITYREFERENCE,	    // ENTITY_REFERENCE_NODE
>+    V8ClassIndex::ENTITY,		    // ENTITY_NODE
>+    V8ClassIndex::PROCESSINGINSTRUCTION,  // PROCESSING_INSTRUCTION_NODE
>+    V8ClassIndex::COMMENT,		    // COMMENT_NODE
>+    V8ClassIndex::INVALID_CLASS_INDEX,    // DOCUMENT_NODE needs special
treatment
>+    V8ClassIndex::DOCUMENTTYPE,	    // DOCUMENT_TYPE_NODE
>+    V8ClassIndex::DOCUMENTFRAGMENT,	    // DOCUMENT_FRAGMENT_NODE
>+    V8ClassIndex::NOTATION,		    // NOTATION_NODE
>+    V8ClassIndex::NODE,		    // XPATH_NAMESPACE_NODE
>+};

This is a little bit fragile.  If someone changes the NodeType
enum, then we'll be in trouble.  I don't have a good suggestion
to avoid this though :(

R=me


More information about the webkit-reviews mailing list