[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

japhet at chromium.org japhet at chromium.org
Thu Apr 8 01:06:05 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 2187cf54a21941f5f247de379886251497581992
Author: japhet at chromium.org <japhet at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 14 18:32:13 2010 +0000

    2010-01-14  Nate Chapin  <japhet at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            Switch the custom V8 bindings to use class toNative() functions.
    
            Refactoring, so no new tests.
    
            * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
            * bindings/v8/custom/V8AttrCustom.cpp:
            * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
            * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
            * bindings/v8/custom/V8ClipboardCustom.cpp:
            * bindings/v8/custom/V8CoordinatesCustom.cpp:
            * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
            * bindings/v8/custom/V8DOMWindowCustom.cpp:
            * bindings/v8/custom/V8DataGridColumnListCustom.cpp:
            * bindings/v8/custom/V8DatabaseCustom.cpp:
            * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
            * bindings/v8/custom/V8DocumentCustom.cpp:
            * bindings/v8/custom/V8DocumentLocationCustom.cpp:
            * bindings/v8/custom/V8ElementCustom.cpp:
            * bindings/v8/custom/V8EventCustom.cpp:
            * bindings/v8/custom/V8GeolocationCustom.cpp:
            * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
            * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
            * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
            * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
            * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
            * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
            * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
            * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
            * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
            * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
            * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
            * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
            * bindings/v8/custom/V8HistoryCustom.cpp:
            * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
            * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
            * bindings/v8/custom/V8LocationCustom.cpp:
            * bindings/v8/custom/V8MessageEventCustom.cpp:
            * bindings/v8/custom/V8MessagePortCustom.cpp:
            * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
            * bindings/v8/custom/V8NodeCustom.cpp:
            * bindings/v8/custom/V8NodeIteratorCustom.cpp:
            * bindings/v8/custom/V8NodeListCustom.cpp:
            * bindings/v8/custom/V8NotificationCenterCustom.cpp:
            * bindings/v8/custom/V8PopStateEventCustom.cpp:
            * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
            * bindings/v8/custom/V8SQLTransactionCustom.cpp:
            * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
            * bindings/v8/custom/V8SVGLengthCustom.cpp:
            * bindings/v8/custom/V8SVGMatrixCustom.cpp:
            * bindings/v8/custom/V8StorageCustom.cpp:
            * bindings/v8/custom/V8StyleSheetListCustom.cpp:
            * bindings/v8/custom/V8TreeWalkerCustom.cpp:
            * bindings/v8/custom/V8WebGLArrayCustom.h:
            * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
            * bindings/v8/custom/V8WebSocketCustom.cpp:
            * bindings/v8/custom/V8WorkerContextCustom.cpp:
            * bindings/v8/custom/V8WorkerCustom.cpp:
            * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
            * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
            * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53271 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0152ac7..4f30845 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,68 @@
+2010-01-14  Nate Chapin  <japhet at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Switch the custom V8 bindings to use class toNative() functions.
+
+        Refactoring, so no new tests.
+
+        * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
+        * bindings/v8/custom/V8AttrCustom.cpp:
+        * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+        * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+        * bindings/v8/custom/V8ClipboardCustom.cpp:
+        * bindings/v8/custom/V8CoordinatesCustom.cpp:
+        * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
+        * bindings/v8/custom/V8DOMWindowCustom.cpp:
+        * bindings/v8/custom/V8DataGridColumnListCustom.cpp:
+        * bindings/v8/custom/V8DatabaseCustom.cpp:
+        * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+        * bindings/v8/custom/V8DocumentCustom.cpp:
+        * bindings/v8/custom/V8DocumentLocationCustom.cpp:
+        * bindings/v8/custom/V8ElementCustom.cpp:
+        * bindings/v8/custom/V8EventCustom.cpp:
+        * bindings/v8/custom/V8GeolocationCustom.cpp:
+        * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
+        * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+        * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+        * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+        * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
+        * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
+        * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+        * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
+        * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+        * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+        * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+        * bindings/v8/custom/V8HistoryCustom.cpp:
+        * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+        * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
+        * bindings/v8/custom/V8LocationCustom.cpp:
+        * bindings/v8/custom/V8MessageEventCustom.cpp:
+        * bindings/v8/custom/V8MessagePortCustom.cpp:
+        * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+        * bindings/v8/custom/V8NodeCustom.cpp:
+        * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+        * bindings/v8/custom/V8NodeListCustom.cpp:
+        * bindings/v8/custom/V8NotificationCenterCustom.cpp:
+        * bindings/v8/custom/V8PopStateEventCustom.cpp:
+        * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
+        * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+        * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
+        * bindings/v8/custom/V8SVGLengthCustom.cpp:
+        * bindings/v8/custom/V8SVGMatrixCustom.cpp:
+        * bindings/v8/custom/V8StorageCustom.cpp:
+        * bindings/v8/custom/V8StyleSheetListCustom.cpp:
+        * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+        * bindings/v8/custom/V8WebGLArrayCustom.h:
+        * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+        * bindings/v8/custom/V8WebSocketCustom.cpp:
+        * bindings/v8/custom/V8WorkerContextCustom.cpp:
+        * bindings/v8/custom/V8WorkerCustom.cpp:
+        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+        * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+        * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
+
 2010-01-14  Brian Weinstein  <bweinstein at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/WebCore/bindings/v8/custom/V8AbstractWorkerCustom.cpp b/WebCore/bindings/v8/custom/V8AbstractWorkerCustom.cpp
index ca9bb65..6b8f195 100644
--- a/WebCore/bindings/v8/custom/V8AbstractWorkerCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8AbstractWorkerCustom.cpp
@@ -47,7 +47,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8AbstractWorker::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS(L"DOM.AbstractWorker.addEventListener()");
-    AbstractWorker* worker = V8DOMWrapper::convertToNativeObject<AbstractWorker>(V8ClassIndex::ABSTRACTWORKER, args.Holder());
+    AbstractWorker* worker = V8AbstractWorker::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(worker, args[1], false, ListenerFindOrCreate);
     if (listener) {
@@ -63,7 +63,7 @@ v8::Handle<v8::Value> V8AbstractWorker::addEventListenerCallback(const v8::Argum
 v8::Handle<v8::Value> V8AbstractWorker::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS(L"DOM.AbstractWorker.removeEventListener()");
-    AbstractWorker* worker = V8DOMWrapper::convertToNativeObject<AbstractWorker>(V8ClassIndex::ABSTRACTWORKER, args.Holder());
+    AbstractWorker* worker = V8AbstractWorker::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(worker, args[1], false, ListenerFindOnly);
     if (listener) {
diff --git a/WebCore/bindings/v8/custom/V8AttrCustom.cpp b/WebCore/bindings/v8/custom/V8AttrCustom.cpp
index b85da2e..7bec619 100644
--- a/WebCore/bindings/v8/custom/V8AttrCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8AttrCustom.cpp
@@ -43,7 +43,7 @@ namespace WebCore {
 
 void V8Attr::valueAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    Attr* imp = V8DOMWrapper::convertDOMWrapperToNode<Attr>(info.Holder());
+    Attr* imp = V8Attr::toNative(info.Holder());
     String attrValue = toWebCoreStringWithNullCheck(value);
     Element* ownerElement = imp->ownerElement();
 
diff --git a/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp b/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp
index 74ff02f..25d141a 100644
--- a/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp
@@ -161,8 +161,7 @@ v8::Handle<v8::Value> V8CSSStyleDeclaration::namedPropertyGetter(v8::Local<v8::S
         return notHandledByInterceptor();
 
     // Search the style declaration.
-    CSSStyleDeclaration* imp =
-        V8DOMWrapper::convertToNativeObject<CSSStyleDeclaration>(V8ClassIndex::CSSSTYLEDECLARATION, info.Holder());
+    CSSStyleDeclaration* imp = V8CSSStyleDeclaration::toNative(info.Holder());
     CSSPropertyInfo* propInfo = cssPropertyInfo(name);
 
     // Do not handle non-property names.
@@ -195,9 +194,7 @@ v8::Handle<v8::Value> V8CSSStyleDeclaration::namedPropertyGetter(v8::Local<v8::S
 v8::Handle<v8::Value> V8CSSStyleDeclaration::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.CSSStyleDeclaration.NamedPropertySetter");
-    CSSStyleDeclaration* imp =
-        V8DOMWrapper::convertToNativeObject<CSSStyleDeclaration>(
-            V8ClassIndex::CSSSTYLEDECLARATION, info.Holder());
+    CSSStyleDeclaration* imp = V8CSSStyleDeclaration::toNative(info.Holder());
     CSSPropertyInfo* propInfo = cssPropertyInfo(name);
     if (!propInfo)
         return notHandledByInterceptor();
diff --git a/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp b/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp
index 389d9c7..b45ef35 100644
--- a/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp
@@ -45,6 +45,7 @@
 #include "V8HTMLCanvasElement.h"
 #include "V8HTMLImageElement.h"
 #include "V8HTMLVideoElement.h"
+#include "V8ImageData.h"
 #include "V8Proxy.h"
 
 namespace WebCore {
@@ -66,35 +67,35 @@ static PassRefPtr<CanvasStyle> toCanvasStyle(v8::Handle<v8::Value> value)
         return CanvasStyle::create(toWebCoreString(value));
 
     if (V8CanvasGradient::HasInstance(value))
-        return CanvasStyle::create(V8DOMWrapper::convertDOMWrapperToNative<CanvasGradient>(v8::Handle<v8::Object>::Cast(value)));
+        return CanvasStyle::create(V8CanvasGradient::toNative(v8::Handle<v8::Object>::Cast(value)));
 
     if (V8CanvasPattern::HasInstance(value))
-        return CanvasStyle::create(V8DOMWrapper::convertDOMWrapperToNative<CanvasPattern>(v8::Handle<v8::Object>::Cast(value)));
+        return CanvasStyle::create(V8CanvasPattern::toNative(v8::Handle<v8::Object>::Cast(value)));
 
     return 0;
 }
 
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::strokeStyleAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
-    CanvasRenderingContext2D* impl = V8DOMWrapper::convertDOMWrapperToNative<CanvasRenderingContext2D>(info.Holder());
+    CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.Holder());
     return toV8(impl->strokeStyle());
 }
 
 void V8CanvasRenderingContext2D::strokeStyleAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    CanvasRenderingContext2D* impl = V8DOMWrapper::convertDOMWrapperToNative<CanvasRenderingContext2D>(info.Holder());
+    CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.Holder());
     impl->setStrokeStyle(toCanvasStyle(value));
 }
 
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::fillStyleAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
-    CanvasRenderingContext2D* impl = V8DOMWrapper::convertDOMWrapperToNative<CanvasRenderingContext2D>(info.Holder());
+    CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.Holder());
     return toV8(impl->fillStyle());
 }
 
 void V8CanvasRenderingContext2D::fillStyleAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    CanvasRenderingContext2D* impl = V8DOMWrapper::convertDOMWrapperToNative<CanvasRenderingContext2D>(info.Holder());
+    CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.Holder());
     impl->setFillStyle(toCanvasStyle(value));
 }
 
@@ -103,7 +104,7 @@ void V8CanvasRenderingContext2D::fillStyleAccessorSetter(v8::Local<v8::String> n
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::setStrokeColorCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.CanvasRenderingContext2D.setStrokeColor()");
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
     switch (args.Length()) {
     case 1:
         if (args[0]->IsString())
@@ -133,7 +134,7 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::setStrokeColorCallback(const v
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::setFillColorCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.CanvasRenderingContext2D.setFillColor()");
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
     switch (args.Length()) {
     case 1:
         if (args[0]->IsString())
@@ -163,7 +164,7 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::setFillColorCallback(const v8:
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::strokeRectCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.CanvasRenderingContext2D.strokeRect()");
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
     if (args.Length() == 5)
         context->strokeRect(toFloat(args[0]), toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]));
     else if (args.Length() == 4)
@@ -178,7 +179,7 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::strokeRectCallback(const v8::A
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::setShadowCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.CanvasRenderingContext2D.setShadow()");
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
 
     switch (args.Length()) {
     case 3:
@@ -213,26 +214,26 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::setShadowCallback(const v8::Ar
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::drawImageCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.CanvasRenderingContext2D.drawImage()");
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
 
     v8::Handle<v8::Value> arg = args[0];
 
     if (V8HTMLImageElement::HasInstance(arg)) {
         ExceptionCode ec = 0;
-        HTMLImageElement* image_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
+        HTMLImageElement* imageElement = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
         switch (args.Length()) {
         case 3:
-            context->drawImage(image_element, toFloat(args[1]), toFloat(args[2]));
+            context->drawImage(imageElement, toFloat(args[1]), toFloat(args[2]));
             break;
         case 5:
-            context->drawImage(image_element, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
+            context->drawImage(imageElement, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
             if (ec != 0) {
                 V8Proxy::setDOMException(ec);
                 return notHandledByInterceptor();
             }
             break;
         case 9:
-            context->drawImage(image_element, 
+            context->drawImage(imageElement, 
                 FloatRect(toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4])), 
                 FloatRect(toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8])),
                 ec);
@@ -250,20 +251,20 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::drawImageCallback(const v8::Ar
     // HTMLCanvasElement
     if (V8HTMLCanvasElement::HasInstance(arg)) {
         ExceptionCode ec = 0;
-        HTMLCanvasElement* canvas_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(v8::Handle<v8::Object>::Cast(arg));
+        HTMLCanvasElement* canvasElement = V8HTMLCanvasElement::toNative(v8::Handle<v8::Object>::Cast(arg));
         switch (args.Length()) {
         case 3:
-            context->drawImage(canvas_element, toFloat(args[1]), toFloat(args[2]));
+            context->drawImage(canvasElement, toFloat(args[1]), toFloat(args[2]));
             break;
         case 5:
-            context->drawImage(canvas_element, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
+            context->drawImage(canvasElement, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
             if (ec != 0) {
                 V8Proxy::setDOMException(ec);
                 return notHandledByInterceptor();
             }
             break;
         case 9:
-            context->drawImage(canvas_element,
+            context->drawImage(canvasElement,
                 FloatRect(toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4])),
                 FloatRect(toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8])),
                 ec);
@@ -282,20 +283,20 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::drawImageCallback(const v8::Ar
     // HTMLVideoElement
     if (V8HTMLVideoElement::HasInstance(arg)) {
         ExceptionCode ec = 0;
-        HTMLVideoElement* video_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLVideoElement>(v8::Handle<v8::Object>::Cast(arg));
+        HTMLVideoElement* videoElement = V8HTMLVideoElement::toNative(v8::Handle<v8::Object>::Cast(arg));
         switch (args.Length()) {
         case 3:
-            context->drawImage(video_element, toFloat(args[1]), toFloat(args[2]));
+            context->drawImage(videoElement, toFloat(args[1]), toFloat(args[2]));
             break;
         case 5:
-            context->drawImage(video_element, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
+            context->drawImage(videoElement, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
             if (ec != 0) {
                 V8Proxy::setDOMException(ec);
                 return notHandledByInterceptor();
             }
             break;
         case 9:
-            context->drawImage(video_element,
+            context->drawImage(videoElement,
                 FloatRect(toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4])),
                 FloatRect(toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8])),
                 ec);
@@ -319,13 +320,13 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::drawImageCallback(const v8::Ar
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::drawImageFromRectCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.CanvasRenderingContext2D.drawImageFromRect()");
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
 
     v8::Handle<v8::Value> arg = args[0];
 
     if (V8HTMLImageElement::HasInstance(arg)) {
-        HTMLImageElement* image_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
-        context->drawImageFromRect(image_element,  toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8]), toWebCoreString(args[9]));
+        HTMLImageElement* imageElement = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
+        context->drawImageFromRect(imageElement,  toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8]), toWebCoreString(args[9]));
     } else
         V8Proxy::throwError(V8Proxy::TypeError, "drawImageFromRect: Invalid type of arguments");
 
@@ -335,14 +336,14 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::drawImageFromRectCallback(cons
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::createPatternCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.CanvasRenderingContext2D.createPattern()");
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
 
     v8::Handle<v8::Value> arg = args[0];
 
     if (V8HTMLImageElement::HasInstance(arg)) {
-        HTMLImageElement* image_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
+        HTMLImageElement* imageElement = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
         ExceptionCode ec = 0;
-        RefPtr<CanvasPattern> pattern = context->createPattern(image_element, toWebCoreStringWithNullCheck(args[1]), ec);
+        RefPtr<CanvasPattern> pattern = context->createPattern(imageElement, toWebCoreStringWithNullCheck(args[1]), ec);
         if (ec != 0) {
             V8Proxy::setDOMException(ec);
             return notHandledByInterceptor();
@@ -351,9 +352,9 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::createPatternCallback(const v8
     }
 
     if (V8HTMLCanvasElement::HasInstance(arg)) {
-        HTMLCanvasElement* canvas_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(v8::Handle<v8::Object>::Cast(arg));
+        HTMLCanvasElement* canvasElement = V8HTMLCanvasElement::toNative(v8::Handle<v8::Object>::Cast(arg));
         ExceptionCode ec = 0;
-        RefPtr<CanvasPattern> pattern = context->createPattern(canvas_element, toWebCoreStringWithNullCheck(args[1]), ec);
+        RefPtr<CanvasPattern> pattern = context->createPattern(canvasElement, toWebCoreStringWithNullCheck(args[1]), ec);
         if (ec != 0) {
             V8Proxy::setDOMException(ec);
             return notHandledByInterceptor();
@@ -369,7 +370,7 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::fillTextCallback(const v8::Arg
 {
     INC_STATS("DOM.CanvasRenderingContext2D.fillText()");
 
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
 
     // Two forms:
     // * fillText(text, x, y)
@@ -395,7 +396,7 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::fillTextCallback(const v8::Arg
 v8::Handle<v8::Value> V8CanvasRenderingContext2D::strokeTextCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.CanvasRenderingContext2D.strokeText()");
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
 
     // Two forms:
     // * strokeText(text, x, y)
@@ -430,16 +431,16 @@ v8::Handle<v8::Value> V8CanvasRenderingContext2D::putImageDataCallback(const v8:
         return notHandledByInterceptor();
     }
 
-    CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+    CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
 
     ImageData* imageData = 0;
 
     // Need to check that the argument is of the correct type, since
-    // convertToNativeObject() expects it to be correct. If the argument was incorrect
+    // toNative() expects it to be correct. If the argument was incorrect
     // we leave it null, and putImageData() will throw the correct exception
     // (TYPE_MISMATCH_ERR).
     if (V8DOMWrapper::isWrapperOfType(args[0], V8ClassIndex::IMAGEDATA))
-        imageData = V8DOMWrapper::convertToNativeObject<ImageData>(V8ClassIndex::IMAGEDATA, v8::Handle<v8::Object>::Cast(args[0]));
+        imageData = V8ImageData::toNative(v8::Handle<v8::Object>::Cast(args[0]));
 
     ExceptionCode ec = 0;
 
diff --git a/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp b/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp
index a96a7fd..5f0b4e3 100644
--- a/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp
@@ -48,7 +48,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8Clipboard::typesAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.Clipboard.types()");
-    Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, info.Holder());
+    Clipboard* clipboard = V8Clipboard::toNative(info.Holder());
 
     HashSet<String> types = clipboard->types();
     if (types.isEmpty())
@@ -66,7 +66,7 @@ v8::Handle<v8::Value> V8Clipboard::typesAccessorGetter(v8::Local<v8::String> nam
 v8::Handle<v8::Value> V8Clipboard::clearDataCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Clipboard.clearData()");
-    Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, args.Holder());
+    Clipboard* clipboard = V8Clipboard::toNative(args.Holder());
 
     if (!args.Length()) {
         clipboard->clearAllData();
@@ -84,7 +84,7 @@ v8::Handle<v8::Value> V8Clipboard::clearDataCallback(const v8::Arguments& args)
 v8::Handle<v8::Value> V8Clipboard::getDataCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Clipboard.getData()");
-    Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, args.Holder());
+    Clipboard* clipboard = V8Clipboard::toNative(args.Holder());
 
     if (args.Length() != 1)
         return throwError("getData: Invalid number of arguments", V8Proxy::SyntaxError);
@@ -100,7 +100,7 @@ v8::Handle<v8::Value> V8Clipboard::getDataCallback(const v8::Arguments& args)
 v8::Handle<v8::Value> V8Clipboard::setDataCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Clipboard.setData()");
-    Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, args.Holder());
+    Clipboard* clipboard = V8Clipboard::toNative(args.Holder());
 
     if (args.Length() != 2)
         return throwError("setData: Invalid number of arguments", V8Proxy::SyntaxError);
@@ -113,7 +113,7 @@ v8::Handle<v8::Value> V8Clipboard::setDataCallback(const v8::Arguments& args)
 v8::Handle<v8::Value> V8Clipboard::setDragImageCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Clipboard.setDragImage()");
-    Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, args.Holder());
+    Clipboard* clipboard = V8Clipboard::toNative(args.Holder());
 
     if (!clipboard->isForDragging())
         return v8::Undefined();
@@ -126,7 +126,7 @@ v8::Handle<v8::Value> V8Clipboard::setDragImageCallback(const v8::Arguments& arg
 
     Node* node = 0;
     if (V8Node::HasInstance(args[0]))
-        node = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
+        node = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
 
     if (!node || !node->isElementNode())
         return throwError("setDragImageFromElement: Invalid first argument");
diff --git a/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp b/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp
index 50e69fa..a5197f5 100644
--- a/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp
@@ -37,7 +37,7 @@ v8::Handle<v8::Value> V8Coordinates::altitudeAccessorGetter(v8::Local<v8::String
 {
     INC_STATS("DOM.Coordinates.altitude._get");
     v8::Handle<v8::Object> holder = info.Holder();
-    Coordinates* imp = V8DOMWrapper::convertToNativeObject<Coordinates>(V8ClassIndex::COORDINATES, holder);
+    Coordinates* imp = V8Coordinates::toNative(holder);
     if (!imp->canProvideAltitude())
         return v8::Null();
     return v8::Number::New(imp->altitude());
@@ -47,7 +47,7 @@ v8::Handle<v8::Value> V8Coordinates::altitudeAccuracyAccessorGetter(v8::Local<v8
 {
     INC_STATS("DOM.Coordinates.altitudeAccuracy._get");
     v8::Handle<v8::Object> holder = info.Holder();
-    Coordinates* imp = V8DOMWrapper::convertToNativeObject<Coordinates>(V8ClassIndex::COORDINATES, holder);
+    Coordinates* imp = V8Coordinates::toNative(holder);
     if (!imp->canProvideAltitudeAccuracy())
         return v8::Null();
     return v8::Number::New(imp->altitudeAccuracy());
@@ -57,7 +57,7 @@ v8::Handle<v8::Value> V8Coordinates::headingAccessorGetter(v8::Local<v8::String>
 {
     INC_STATS("DOM.Coordinates.heading._get");
     v8::Handle<v8::Object> holder = info.Holder();
-    Coordinates* imp = V8DOMWrapper::convertToNativeObject<Coordinates>(V8ClassIndex::COORDINATES, holder);
+    Coordinates* imp = V8Coordinates::toNative(holder);
     if (!imp->canProvideHeading())
         return v8::Null();
     return v8::Number::New(imp->heading());
@@ -67,7 +67,7 @@ v8::Handle<v8::Value> V8Coordinates::speedAccessorGetter(v8::Local<v8::String> n
 {
     INC_STATS("DOM.Coordinates.speed._get");
     v8::Handle<v8::Object> holder = info.Holder();
-    Coordinates* imp = V8DOMWrapper::convertToNativeObject<Coordinates>(V8ClassIndex::COORDINATES, holder);
+    Coordinates* imp = V8Coordinates::toNative(holder);
     if (!imp->canProvideSpeed())
         return v8::Null();
     return v8::Number::New(imp->speed());
diff --git a/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp b/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp
index 2316526..a439432 100644
--- a/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp
@@ -48,7 +48,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8DOMApplicationCache::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOMApplicationCache.addEventListener()");
-    DOMApplicationCache* appcache = V8DOMWrapper::convertToNativeObject<DOMApplicationCache>(V8ClassIndex::DOMAPPLICATIONCACHE, args.Holder());
+    DOMApplicationCache* appcache = V8DOMApplicationCache::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(appcache, args[1], false, ListenerFindOrCreate);
     if (listener) {
@@ -64,7 +64,7 @@ v8::Handle<v8::Value> V8DOMApplicationCache::addEventListenerCallback(const v8::
 v8::Handle<v8::Value> V8DOMApplicationCache::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOMApplicationCache.removeEventListener()");
-    DOMApplicationCache* appcache = V8DOMWrapper::convertToNativeObject<DOMApplicationCache>(V8ClassIndex::DOMAPPLICATIONCACHE, args.Holder());
+    DOMApplicationCache* appcache = V8DOMApplicationCache::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(appcache, args[1], false, ListenerFindOnly);
     if (listener) {
diff --git a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
index d606f24..dacd4f6 100644
--- a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
@@ -103,7 +103,7 @@ v8::Handle<v8::Value> WindowSetTimeoutImpl(const v8::Arguments& args, bool singl
     if (argumentCount >= 2)
         timeout = args[1]->Int32Value();
 
-    DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+    DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
 
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
         return v8::Undefined();
@@ -174,7 +174,7 @@ v8::Handle<v8::Value> V8DOMWindow::eventAccessorGetter(v8::Local<v8::String> nam
     if (holder.IsEmpty())
         return v8::Undefined();
 
-    Frame* frame = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, holder)->frame();
+    Frame* frame = V8DOMWindow::toNative(holder)->frame();
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, true))
         return v8::Undefined();
 
@@ -195,7 +195,7 @@ void V8DOMWindow::eventAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::
     if (holder.IsEmpty())
         return;
 
-    Frame* frame = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, holder)->frame();
+    Frame* frame = V8DOMWindow::toNative(holder)->frame();
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, true))
         return;
 
@@ -215,14 +215,14 @@ v8::Handle<v8::Value> V8DOMWindow::cryptoAccessorGetter(v8::Local<v8::String> na
 
 void V8DOMWindow::locationAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+    DOMWindow* imp = V8DOMWindow::toNative(info.Holder());
     V8DOMWindowShell::setLocation(imp, toWebCoreString(value));
 }
 
 
 void V8DOMWindow::openerAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+    DOMWindow* imp = V8DOMWindow::toNative(info.Holder());
 
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
         return;
@@ -248,7 +248,7 @@ void V8DOMWindow::openerAccessorSetter(v8::Local<v8::String> name, v8::Local<v8:
 
 v8::Handle<v8::Value> V8DOMWindow::AudioAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
-    DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+    DOMWindow* window = V8DOMWindow::toNative(info.Holder());
     return V8DOMWrapper::getConstructor(V8ClassIndex::AUDIO, window);
 }
 
@@ -328,13 +328,13 @@ bool V8DOMWindow::ApplicationCacheEnabled()
 
 v8::Handle<v8::Value> V8DOMWindow::ImageAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
-    DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+    DOMWindow* window = V8DOMWindow::toNative(info.Holder());
     return V8DOMWrapper::getConstructor(V8ClassIndex::IMAGE, window);
 }
 
 v8::Handle<v8::Value> V8DOMWindow::OptionAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
-    DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+    DOMWindow* window = V8DOMWindow::toNative(info.Holder());
     return V8DOMWrapper::getConstructor(V8ClassIndex::OPTION, window);
 }
 
@@ -345,7 +345,7 @@ v8::Handle<v8::Value> V8DOMWindow::addEventListenerCallback(const v8::Arguments&
     String eventType = toWebCoreString(args[0]);
     bool useCapture = args[2]->BooleanValue();
 
-    DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+    DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
 
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
         return v8::Undefined();
@@ -378,7 +378,7 @@ v8::Handle<v8::Value> V8DOMWindow::removeEventListenerCallback(const v8::Argumen
     String eventType = toWebCoreString(args[0]);
     bool useCapture = args[2]->BooleanValue();
 
-    DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+    DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
 
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
         return v8::Undefined();
@@ -405,7 +405,7 @@ v8::Handle<v8::Value> V8DOMWindow::removeEventListenerCallback(const v8::Argumen
 v8::Handle<v8::Value> V8DOMWindow::postMessageCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.DOMWindow.postMessage()");
-    DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+    DOMWindow* window = V8DOMWindow::toNative(args.Holder());
 
     DOMWindow* source = V8Proxy::retrieveFrameForCallingContext()->domWindow();
     ASSERT(source->frame());
@@ -443,7 +443,7 @@ v8::Handle<v8::Value> V8DOMWindow::atobCallback(const v8::Arguments& args)
         return v8String("");
     String str = toWebCoreString(args[0]);
 
-    DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+    DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
 
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
         return v8::Undefined();
@@ -462,7 +462,7 @@ v8::Handle<v8::Value> V8DOMWindow::btoaCallback(const v8::Arguments& args)
         return v8String("");
     String str = toWebCoreString(args[0]);
 
-    DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+    DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
 
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
         return v8::Undefined();
@@ -556,8 +556,7 @@ v8::Handle<v8::Value> V8DOMWindow::showModalDialogCallback(const v8::Arguments&
     v8::Local<v8::Value> dialogArgs = args[1];
     String featureArgs = toWebCoreStringWithNullOrUndefinedCheck(args[2]);
 
-    DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(
-        V8ClassIndex::DOMWINDOW, args.Holder());
+    DOMWindow* window = V8DOMWindow::toNative(args.Holder());
     Frame* frame = window->frame();
 
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, true))
@@ -645,7 +644,7 @@ v8::Handle<v8::Value> V8DOMWindow::openCallback(const v8::Arguments& args)
     String urlString = toWebCoreStringWithNullOrUndefinedCheck(args[0]);
     AtomicString frameName = (args[1]->IsUndefined() || args[1]->IsNull()) ? "_blank" : AtomicString(toWebCoreString(args[1]));
 
-    DOMWindow* parent = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+    DOMWindow* parent = V8DOMWindow::toNative(args.Holder());
     Frame* frame = parent->frame();
 
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, true))
@@ -769,7 +768,7 @@ v8::Handle<v8::Value> V8DOMWindow::indexedPropertyGetter(uint32_t index, const v
 {
     INC_STATS("DOM.DOMWindow.IndexedPropertyGetter");
 
-    DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+    DOMWindow* window = V8DOMWindow::toNative(info.Holder());
     if (!window)
         return notHandledByInterceptor();
 
@@ -789,8 +788,7 @@ v8::Handle<v8::Value> V8DOMWindow::namedPropertyGetter(v8::Local<v8::String> nam
 {
     INC_STATS("DOM.DOMWindow.NamedPropertyGetter");
 
-    // TODO(antonm): investigate what convertToNativeObject does for the case of DOMWINDOW.
-    DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+    DOMWindow* window = V8DOMWindow::toNative(info.Holder());
     if (!window)
         return notHandledByInterceptor();
 
@@ -847,7 +845,7 @@ void ClearTimeoutImpl(const v8::Arguments& args)
     int handle = toInt32(args[0]);
 
     v8::Handle<v8::Object> holder = args.Holder();
-    DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, holder);
+    DOMWindow* imp = V8DOMWindow::toNative(holder);
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
         return;
     ScriptExecutionContext* context = static_cast<ScriptExecutionContext*>(imp->document());
@@ -878,7 +876,7 @@ bool V8DOMWindow::namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::V
     if (window.IsEmpty())
         return false;  // the frame is gone.
 
-    DOMWindow* targetWindow = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, window);
+    DOMWindow* targetWindow = V8DOMWindow::toNative(window);
 
     ASSERT(targetWindow);
 
@@ -904,7 +902,7 @@ bool V8DOMWindow::indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t inde
     if (window.IsEmpty())
         return false;
 
-    DOMWindow* targetWindow = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, window);
+    DOMWindow* targetWindow = V8DOMWindow::toNative(window);
 
     ASSERT(targetWindow);
 
diff --git a/WebCore/bindings/v8/custom/V8DataGridColumnListCustom.cpp b/WebCore/bindings/v8/custom/V8DataGridColumnListCustom.cpp
index a8fbfc2..8980cfe 100644
--- a/WebCore/bindings/v8/custom/V8DataGridColumnListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DataGridColumnListCustom.cpp
@@ -53,7 +53,7 @@ NAMED_PROPERTY_GETTER(DataGridColumnList)
         return notHandledByInterceptor();
     
     // Finally, look up a column by name.
-    DataGridColumnList* imp = V8DOMWrapper::convertToNativeObject<DataGridColumnList>(V8ClassIndex::DATAGRIDCOLUMNLIST, info.Holder());
+    DataGridColumnList* imp = V8DataGridColumnList::toNative(info.Holder());
     DataGridColumn* result = imp->itemWithName(toWebCoreString(name));
     if (!result)
         return notHandledByInterceptor();
diff --git a/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp b/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
index 66281d9..c83e1cc 100644
--- a/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
@@ -53,7 +53,7 @@ v8::Handle<v8::Value> V8Database::changeVersionCallback(const v8::Arguments& arg
     if (!(args[0]->IsString() && args[1]->IsString()))
         return throwError("The old and new versions must be strings.");
 
-    Database* database = V8DOMWrapper::convertToNativeObject<Database>(V8ClassIndex::DATABASE, args.Holder());
+    Database* database = V8Database::toNative(args.Holder());
 
     Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
     if (!frame)
@@ -96,7 +96,7 @@ static v8::Handle<v8::Value> createTransaction(const v8::Arguments& args, bool r
     if (!args[0]->IsObject())
         return throwError("Transaction callback must be of valid type.");
 
-    Database* database = V8DOMWrapper::convertToNativeObject<Database>(V8ClassIndex::DATABASE, args.Holder());
+    Database* database = V8Database::toNative(args.Holder());
 
     Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
     if (!frame)
diff --git a/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp b/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp
index 02c1453..5ab6218 100644
--- a/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp
@@ -45,7 +45,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8DedicatedWorkerContext::postMessageCallback(const v8::Arguments& args)
 {
     INC_STATS(L"DOM.DedicatedWorkerContext.postMessage");
-    DedicatedWorkerContext* workerContext = V8DOMWrapper::convertToNativeObject<DedicatedWorkerContext>(V8ClassIndex::DEDICATEDWORKERCONTEXT, args.Holder());
+    DedicatedWorkerContext* workerContext = V8DedicatedWorkerContext::toNative(args.Holder());
     RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(v8ValueToWebCoreString(args[0]));
     MessagePortArray portArray;
     if (args.Length() > 1) {
diff --git a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
index f7e5966..5adfa71 100644
--- a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
@@ -55,12 +55,12 @@ v8::Handle<v8::Value> V8Document::evaluateCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Document.evaluate()");
 
-    RefPtr<Document> document = V8DOMWrapper::convertDOMWrapperToNode<Document>(args.Holder());
+    RefPtr<Document> document = V8Document::toNative(args.Holder());
     ExceptionCode ec = 0;
     String expression = toWebCoreString(args[0]);
     RefPtr<Node> contextNode;
     if (V8Node::HasInstance(args[1]))
-        contextNode = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[1]));
+        contextNode = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1]));
 
     RefPtr<XPathNSResolver> resolver = V8DOMWrapper::getXPathNSResolver(args[2], V8Proxy::retrieve(V8Proxy::retrieveFrameForCallingContext()));
     if (!resolver && !args[2]->IsNull() && !args[2]->IsUndefined())
@@ -69,7 +69,7 @@ v8::Handle<v8::Value> V8Document::evaluateCallback(const v8::Arguments& args)
     int type = toInt32(args[3]);
     RefPtr<XPathResult> inResult;
     if (V8XPathResult::HasInstance(args[4]))
-        inResult = V8DOMWrapper::convertToNativeObject<XPathResult>(V8ClassIndex::XPATHRESULT, v8::Handle<v8::Object>::Cast(args[4]));
+        inResult = V8XPathResult::toNative(v8::Handle<v8::Object>::Cast(args[4]));
 
     v8::TryCatch exceptionCatcher;
     RefPtr<XPathResult> result = document->evaluate(expression, contextNode.get(), resolver.get(), type, inResult.get(), ec);
@@ -86,7 +86,7 @@ v8::Handle<v8::Value> V8Document::getCSSCanvasContextCallback(const v8::Argument
 {
     INC_STATS("DOM.Document.getCSSCanvasContext");
     v8::Handle<v8::Object> holder = args.Holder();
-    Document* imp = V8DOMWrapper::convertDOMWrapperToNode<Document>(holder);
+    Document* imp = V8Document::toNative(holder);
     String contextId = toWebCoreString(args[0]);
     String name = toWebCoreString(args[1]);
     int width = toInt32(args[2]);
@@ -123,7 +123,7 @@ v8::Handle<v8::Value> V8Document::implementationAccessorGetter(v8::Local<v8::Str
         return implementation;
 
     // Generate a wrapper.
-    Document* document = V8DOMWrapper::convertDOMWrapperToNative<Document>(info.Holder());
+    Document* document = V8Document::toNative(info.Holder());
     v8::Handle<v8::Value> wrapper = V8DOMWrapper::convertDOMImplementationToV8Object(document->implementation());
 
     // Store the wrapper in the internal field.
diff --git a/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp b/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp
index 65f1305..8dc4672 100644
--- a/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp
@@ -35,7 +35,7 @@ namespace WebCore {
 
 v8::Handle<v8::Value> V8Document::locationAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
-    Document* document = V8DOMWrapper::convertDOMWrapperToNative<Document>(info.Holder());
+    Document* document = V8Document::toNative(info.Holder());
     if (!document->frame())
         return v8::Null();
 
@@ -45,7 +45,7 @@ v8::Handle<v8::Value> V8Document::locationAccessorGetter(v8::Local<v8::String> n
 
 void V8Document::locationAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    Document* document = V8DOMWrapper::convertDOMWrapperToNative<Document>(info.Holder());
+    Document* document = V8Document::toNative(info.Holder());
     if (!document->frame())
         return;
 
diff --git a/WebCore/bindings/v8/custom/V8ElementCustom.cpp b/WebCore/bindings/v8/custom/V8ElementCustom.cpp
index 9924aa8..0f13f9d 100644
--- a/WebCore/bindings/v8/custom/V8ElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8ElementCustom.cpp
@@ -53,7 +53,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8Element::setAttributeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Element.setAttribute()");
-    Element* element = V8DOMWrapper::convertDOMWrapperToNode<Element>(args.Holder());
+    Element* element = V8Element::toNative(args.Holder());
     String name = toWebCoreString(args[0]);
     String value = toWebCoreString(args[1]);
 
@@ -74,8 +74,8 @@ v8::Handle<v8::Value> V8Element::setAttributeNodeCallback(const v8::Arguments& a
     if (!V8Attr::HasInstance(args[0]))
         return throwError(TYPE_MISMATCH_ERR);
 
-    Attr* newAttr = V8DOMWrapper::convertDOMWrapperToNode<Attr>(v8::Handle<v8::Object>::Cast(args[0]));
-    Element* element = V8DOMWrapper::convertDOMWrapperToNode<Element>(args.Holder());
+    Attr* newAttr = V8Attr::toNative(v8::Handle<v8::Object>::Cast(args[0]));
+    Element* element = V8Element::toNative(args.Holder());
 
     if (!V8BindingSecurity::allowSettingSrcToJavascriptURL(V8BindingState::Only(), element, newAttr->name(), newAttr->value()))
         return v8::Undefined();
@@ -91,7 +91,7 @@ v8::Handle<v8::Value> V8Element::setAttributeNodeCallback(const v8::Arguments& a
 v8::Handle<v8::Value> V8Element::setAttributeNSCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Element.setAttributeNS()");
-    Element* element = V8DOMWrapper::convertDOMWrapperToNode<Element>(args.Holder());
+    Element* element = V8Element::toNative(args.Holder());
     String namespaceURI = toWebCoreStringWithNullCheck(args[0]);
     String qualifiedName = toWebCoreString(args[1]);
     String value = toWebCoreString(args[2]);
@@ -113,8 +113,8 @@ v8::Handle<v8::Value> V8Element::setAttributeNodeNSCallback(const v8::Arguments&
     if (!V8Attr::HasInstance(args[0]))
         return throwError(TYPE_MISMATCH_ERR);
 
-    Attr* newAttr = V8DOMWrapper::convertDOMWrapperToNode<Attr>(v8::Handle<v8::Object>::Cast(args[0]));
-    Element* element = V8DOMWrapper::convertDOMWrapperToNode<Element>(args.Holder());
+    Attr* newAttr = V8Attr::toNative(v8::Handle<v8::Object>::Cast(args[0]));
+    Element* element = V8Element::toNative(args.Holder());
 
     if (!V8BindingSecurity::allowSettingSrcToJavascriptURL(V8BindingState::Only(), element, newAttr->name(), newAttr->value()))
         return v8::Undefined();
diff --git a/WebCore/bindings/v8/custom/V8EventCustom.cpp b/WebCore/bindings/v8/custom/V8EventCustom.cpp
index d8b8379..65cd41e 100644
--- a/WebCore/bindings/v8/custom/V8EventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8EventCustom.cpp
@@ -43,13 +43,13 @@ namespace WebCore {
 
 void V8Event::valueAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    Event* event = V8DOMWrapper::convertDOMWrapperToNative<Event>(info.Holder());
+    Event* event = V8Event::toNative(info.Holder());
     event->setDefaultPrevented(!value->BooleanValue());
 }
 
 v8::Handle<v8::Value> V8Event::dataTransferAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
-    Event* event = V8DOMWrapper::convertDOMWrapperToNative<Event>(info.Holder());
+    Event* event = V8Event::toNative(info.Holder());
 
     if (event->isDragEvent())
         return V8DOMWrapper::convertToV8Object(V8ClassIndex::CLIPBOARD, static_cast<MouseEvent*>(event)->clipboard());
@@ -59,7 +59,7 @@ v8::Handle<v8::Value> V8Event::dataTransferAccessorGetter(v8::Local<v8::String>
 
 v8::Handle<v8::Value> V8Event::clipboardDataAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
-    Event* event = V8DOMWrapper::convertDOMWrapperToNative<Event>(info.Holder());
+    Event* event = V8Event::toNative(info.Holder());
 
     if (event->isClipboardEvent())
         return V8DOMWrapper::convertToV8Object(V8ClassIndex::CLIPBOARD, static_cast<ClipboardEvent*>(event)->clipboard());
diff --git a/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp b/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
index 31defbb..6bd9ff2 100644
--- a/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
@@ -187,7 +187,7 @@ v8::Handle<v8::Value> V8Geolocation::getCurrentPositionCallback(const v8::Argume
         return v8::Undefined();
     ASSERT(positionOptions);
 
-    Geolocation* geolocation = V8DOMWrapper::convertToNativeObject<Geolocation>(V8ClassIndex::GEOLOCATION, args.Holder());
+    Geolocation* geolocation = V8Geolocation::toNative(args.Holder());
     geolocation->getCurrentPosition(positionCallback.release(), positionErrorCallback.release(), positionOptions.release());
     return v8::Undefined();
 }
@@ -212,7 +212,7 @@ v8::Handle<v8::Value> V8Geolocation::watchPositionCallback(const v8::Arguments&
         return v8::Undefined();
     ASSERT(positionOptions);
 
-    Geolocation* geolocation = V8DOMWrapper::convertToNativeObject<Geolocation>(V8ClassIndex::GEOLOCATION, args.Holder());
+    Geolocation* geolocation = V8Geolocation::toNative(args.Holder());
     int watchId = geolocation->watchPosition(positionCallback.release(), positionErrorCallback.release(), positionOptions.release());
     return v8::Number::New(watchId);
 }
diff --git a/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
index e274b7b..c34d9e7 100644
--- a/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
@@ -86,21 +86,21 @@ v8::Handle<v8::Value> V8HTMLAllCollection::namedPropertyGetter(v8::Local<v8::Str
         return v8::Handle<v8::Value>();
 
     // Finally, search the DOM structure.
-    HTMLAllCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLAllCollection>(V8ClassIndex::HTMLALLCOLLECTION, info.Holder());
+    HTMLAllCollection* imp = V8HTMLAllCollection::toNative(info.Holder());
     return getNamedItems(imp, v8StringToAtomicWebCoreString(name));
 }
 
 v8::Handle<v8::Value> V8HTMLAllCollection::itemCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLAllCollection.item()");
-    HTMLAllCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLAllCollection>(V8ClassIndex::HTMLALLCOLLECTION, args.Holder());
+    HTMLAllCollection* imp = V8HTMLAllCollection::toNative(args.Holder());
     return getItem(imp, args[0]);
 }
 
 v8::Handle<v8::Value> V8HTMLAllCollection::namedItemCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLAllCollection.namedItem()");
-    HTMLAllCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLAllCollection>(V8ClassIndex::HTMLALLCOLLECTION, args.Holder());
+    HTMLAllCollection* imp = V8HTMLAllCollection::toNative(args.Holder());
     v8::Handle<v8::Value> result = getNamedItems(imp, toWebCoreString(args[0]));
 
     if (result.IsEmpty())
@@ -115,7 +115,7 @@ v8::Handle<v8::Value> V8HTMLAllCollection::callAsFunctionCallback(const v8::Argu
     if (args.Length() < 1)
         return v8::Undefined();
 
-    HTMLAllCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLAllCollection>(V8ClassIndex::HTMLALLCOLLECTION, args.Holder());
+    HTMLAllCollection* imp = V8HTMLAllCollection::toNative(args.Holder());
 
     if (args.Length() == 1)
         return getItem(imp, args[0]);
diff --git a/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
index 9bdaef5..0d1ff44 100644
--- a/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
@@ -46,7 +46,7 @@ v8::Handle<v8::Value> V8HTMLCanvasElement::getContextCallback(const v8::Argument
 {
     INC_STATS("DOM.HTMLCanvasElement.context");
     v8::Handle<v8::Object> holder = args.Holder();
-    HTMLCanvasElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(holder);
+    HTMLCanvasElement* imp = V8HTMLCanvasElement::toNative(holder);
     String contextId = toWebCoreString(args[0]);
     RefPtr<CanvasContextAttributes> attrs;
 #if ENABLE(3D_CANVAS)
diff --git a/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
index f2a4367..8bb3c3a 100644
--- a/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
@@ -85,21 +85,21 @@ v8::Handle<v8::Value> V8HTMLCollection::namedPropertyGetter(v8::Local<v8::String
         return v8::Handle<v8::Value>();
 
     // Finally, search the DOM structure.
-    HTMLCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLCollection>(V8ClassIndex::HTMLCOLLECTION, info.Holder());
+    HTMLCollection* imp = V8HTMLCollection::toNative(info.Holder());
     return getNamedItems(imp, v8StringToAtomicWebCoreString(name));
 }
 
 v8::Handle<v8::Value> V8HTMLCollection::itemCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLCollection.item()");
-    HTMLCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLCollection>(V8ClassIndex::HTMLCOLLECTION, args.Holder());
+    HTMLCollection* imp = V8HTMLCollection::toNative(args.Holder());
     return getItem(imp, args[0]);
 }
 
 v8::Handle<v8::Value> V8HTMLCollection::namedItemCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLCollection.namedItem()");
-    HTMLCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLCollection>(V8ClassIndex::HTMLCOLLECTION, args.Holder());
+    HTMLCollection* imp = V8HTMLCollection::toNative(args.Holder());
     v8::Handle<v8::Value> result = getNamedItems(imp, toWebCoreString(args[0]));
 
     if (result.IsEmpty())
@@ -114,7 +114,7 @@ v8::Handle<v8::Value> V8HTMLCollection::callAsFunctionCallback(const v8::Argumen
     if (args.Length() < 1)
         return v8::Undefined();
 
-    HTMLCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLCollection>(V8ClassIndex::HTMLCOLLECTION, args.Holder());
+    HTMLCollection* imp = V8HTMLCollection::toNative(args.Holder());
 
     if (args.Length() == 1)
         return getItem(imp, args[0]);
diff --git a/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
index cee145d..f7aad4d 100644
--- a/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
@@ -77,7 +77,7 @@ v8::Handle<v8::Value> V8HTMLDocument::namedPropertyGetter(v8::Local<v8::String>
             return value;
     }
 
-    HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(info.Holder());
+    HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
 
     // Fast case for named elements that are not there.
     if (!htmlDocument->hasNamedItem(key.impl()) && !htmlDocument->hasExtraNamedItem(key.impl()))
@@ -116,7 +116,7 @@ static String writeHelperGetString(const v8::Arguments& args)
 v8::Handle<v8::Value> V8HTMLDocument::writeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLDocument.write()");
-    HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(args.Holder());
+    HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
     Frame* frame = V8Proxy::retrieveFrameForCallingContext();
     htmlDocument->write(writeHelperGetString(args), frame ? frame->document() : NULL);
     return v8::Undefined();
@@ -125,7 +125,7 @@ v8::Handle<v8::Value> V8HTMLDocument::writeCallback(const v8::Arguments& args)
 v8::Handle<v8::Value> V8HTMLDocument::writelnCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLDocument.writeln()");
-    HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(args.Holder());
+    HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
     Frame* frame = V8Proxy::retrieveFrameForCallingContext();
     htmlDocument->writeln(writeHelperGetString(args), frame ? frame->document() : NULL);
     return v8::Undefined();
@@ -134,7 +134,7 @@ v8::Handle<v8::Value> V8HTMLDocument::writelnCallback(const v8::Arguments& args)
 v8::Handle<v8::Value> V8HTMLDocument::openCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLDocument.open()");
-    HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(args.Holder());
+    HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
 
     if (args.Length() > 2) {
         if (Frame* frame = htmlDocument->frame()) {
@@ -176,7 +176,7 @@ v8::Handle<v8::Value> V8HTMLDocument::allAccessorGetter(v8::Local<v8::String> na
     INC_STATS("DOM.HTMLDocument.all._get");
     v8::HandleScope scope;
     v8::Handle<v8::Object> holder = info.Holder();
-    HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(holder);
+    HTMLDocument* htmlDocument = V8HTMLDocument::toNative(holder);
     return V8DOMWrapper::convertToV8Object(V8ClassIndex::HTMLCOLLECTION, htmlDocument->all());
 }
 
diff --git a/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp
index 966381a..d819e9b 100644
--- a/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp
@@ -43,7 +43,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8HTMLFormElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLFormElement.IndexedPropertyGetter");
-    HTMLFormElement* form = V8DOMWrapper::convertDOMWrapperToNode<HTMLFormElement>(info.Holder());
+    HTMLFormElement* form = V8HTMLFormElement::toNative(info.Holder());
 
     RefPtr<Node> formElement = form->elements()->item(index);
     if (!formElement)
@@ -54,7 +54,7 @@ v8::Handle<v8::Value> V8HTMLFormElement::indexedPropertyGetter(uint32_t index, c
 v8::Handle<v8::Value> V8HTMLFormElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLFormElement.NamedPropertyGetter");
-    HTMLFormElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLFormElement>(info.Holder());
+    HTMLFormElement* imp = V8HTMLFormElement::toNative(info.Holder());
     AtomicString v = v8StringToAtomicWebCoreString(name);
 
     // Call getNamedElements twice, first time check if it has a value
@@ -83,7 +83,7 @@ v8::Handle<v8::Value> V8HTMLFormElement::namedPropertyGetter(v8::Local<v8::Strin
 v8::Handle<v8::Value> V8HTMLFormElement::submitCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLFormElement.submit()");
-    HTMLFormElement* form = V8DOMWrapper::convertDOMWrapperToNative<HTMLFormElement>(args.Holder());
+    HTMLFormElement* form = V8HTMLFormElement::toNative(args.Holder());
     Frame* frame = V8Proxy::retrieveFrameForEnteredContext();
     if (!frame)
         return v8::Undefined();
diff --git a/WebCore/bindings/v8/custom/V8HTMLFrameElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLFrameElementCustom.cpp
index d459133..fd831bf 100644
--- a/WebCore/bindings/v8/custom/V8HTMLFrameElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLFrameElementCustom.cpp
@@ -44,7 +44,7 @@ using namespace HTMLNames;
 
 void V8HTMLFrameElement::srcAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    HTMLFrameElement* frame = V8DOMWrapper::convertDOMWrapperToNode<HTMLFrameElement>(info.Holder());
+    HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder());
     String srcValue = toWebCoreStringWithNullCheck(value);
 
     if (!V8BindingSecurity::allowSettingFrameSrcToJavascriptUrl(V8BindingState::Only(), frame, srcValue))
@@ -55,7 +55,7 @@ void V8HTMLFrameElement::srcAccessorSetter(v8::Local<v8::String> name, v8::Local
 
 void V8HTMLFrameElement::locationAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    HTMLFrameElement* frame = V8DOMWrapper::convertDOMWrapperToNode<HTMLFrameElement>(info.Holder());
+    HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder());
     String locationValue = toWebCoreStringWithNullCheck(value);
 
     if (!V8BindingSecurity::allowSettingFrameSrcToJavascriptUrl(V8BindingState::Only(), frame, locationValue))
diff --git a/WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp
index e8bed59..214b11e 100644
--- a/WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp
@@ -48,7 +48,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8HTMLFrameSetElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLFrameSetElement.NamedPropertyGetter");
-    HTMLFrameSetElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLFrameSetElement>(info.Holder());
+    HTMLFrameSetElement* imp = V8HTMLFrameSetElement::toNative(info.Holder());
     Node* frameNode = imp->children()->namedItem(v8StringToAtomicWebCoreString(name));
     if (frameNode && frameNode->hasTagName(HTMLNames::frameTag)) {
         Document* doc = static_cast<HTMLFrameElement*>(frameNode)->contentDocument();
diff --git a/WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp
index 105beb2..1949632 100644
--- a/WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp
@@ -44,7 +44,7 @@ using namespace HTMLNames;
 
 void V8HTMLIFrameElement::srcAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    HTMLIFrameElement* iframe = V8DOMWrapper::convertDOMWrapperToNode<HTMLIFrameElement>(info.Holder());
+    HTMLIFrameElement* iframe = V8HTMLIFrameElement::toNative(info.Holder());
     String v = toWebCoreStringWithNullCheck(value);
 
     if (!V8BindingSecurity::allowSettingFrameSrcToJavascriptUrl(V8BindingState::Only(), iframe, v))
diff --git a/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp
index 3f998c5..78486b3 100644
--- a/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp
@@ -43,7 +43,7 @@ v8::Handle<v8::Value> V8HTMLInputElement::selectionStartAccessorGetter(v8::Local
 {
     INC_STATS("DOM.HTMLInputElement.selectionStart._get");
     v8::Handle<v8::Object> holder = info.Holder();
-    HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+    HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection())
         return throwError("Accessing selectionStart on an input element that cannot have a selection.");
@@ -56,7 +56,7 @@ void V8HTMLInputElement::selectionStartAccessorSetter(v8::Local<v8::String> name
 {
     INC_STATS("DOM.HTMLInputElement.selectionStart._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+    HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection()) {
         throwError("Accessing selectionStart on an input element that cannot have a selection.");
@@ -69,7 +69,7 @@ v8::Handle<v8::Value> V8HTMLInputElement::selectionEndAccessorGetter(v8::Local<v
 {
     INC_STATS("DOM.HTMLInputElement.selectionEnd._get");
     v8::Handle<v8::Object> holder = info.Holder();
-    HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+    HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection())
         return throwError("Accessing selectionEnd on an input element that cannot have a selection.");
@@ -82,7 +82,7 @@ void V8HTMLInputElement::selectionEndAccessorSetter(v8::Local<v8::String> name,
 {
     INC_STATS("DOM.HTMLInputElement.selectionEnd._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+    HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection()) {
         throwError("Accessing selectionEnd on an input element that cannot have a selection.");
@@ -96,7 +96,7 @@ v8::Handle<v8::Value> V8HTMLInputElement::setSelectionRangeCallback(const v8::Ar
 {
     INC_STATS("DOM.HTMLInputElement.setSelectionRange");
     v8::Handle<v8::Object> holder = args.Holder();
-    HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+    HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection())
         return throwError("Calling setSelectionRange on an input element that cannot have a selection.");
diff --git a/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
index 7c6e9e4..c060df7 100644
--- a/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
@@ -47,7 +47,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8HTMLOptionsCollection::removeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLOptionsCollection.remove()");
-    HTMLOptionsCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, args.Holder());
+    HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder());
     HTMLSelectElement* base = static_cast<HTMLSelectElement*>(imp->base());
     return removeElement(base, args);
 }
@@ -59,8 +59,8 @@ v8::Handle<v8::Value> V8HTMLOptionsCollection::addCallback(const v8::Arguments&
         V8Proxy::setDOMException(TYPE_MISMATCH_ERR);
         return v8::Undefined();
     }
-    HTMLOptionsCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, args.Holder());
-    HTMLOptionElement* option = V8DOMWrapper::convertDOMWrapperToNode<HTMLOptionElement>(v8::Handle<v8::Object>(v8::Handle<v8::Object>::Cast(args[0])));
+    HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder());
+    HTMLOptionElement* option = V8HTMLOptionElement::toNative(v8::Handle<v8::Object>(v8::Handle<v8::Object>::Cast(args[0])));
 
     ExceptionCode ec = 0;
     if (args.Length() < 2)
@@ -88,7 +88,7 @@ v8::Handle<v8::Value> V8HTMLOptionsCollection::addCallback(const v8::Arguments&
 v8::Handle<v8::Value> V8HTMLOptionsCollection::lengthAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLOptionsCollection.length._get");
-    HTMLOptionsCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
+    HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(info.Holder());
     int v = imp->length();
     return v8::Integer::New(v);
 }
@@ -96,7 +96,7 @@ v8::Handle<v8::Value> V8HTMLOptionsCollection::lengthAccessorGetter(v8::Local<v8
 void V8HTMLOptionsCollection::lengthAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLOptionsCollection.length._set");
-    HTMLOptionsCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
+    HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(info.Holder());
     double v = value->NumberValue();
     unsigned newLength = 0;
     ExceptionCode ec = 0;
@@ -117,7 +117,7 @@ void V8HTMLOptionsCollection::lengthAccessorSetter(v8::Local<v8::String> name, v
 v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLOptionsCollection.IndexedPropertyGetter");
-    HTMLOptionsCollection* collection = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
+    HTMLOptionsCollection* collection = V8HTMLOptionsCollection::toNative(info.Holder());
 
     RefPtr<Node> result = collection->item(index);
     if (!result)
@@ -129,7 +129,7 @@ v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertyGetter(uint32_t in
 v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLOptionsCollection.IndexedPropertySetter");
-    HTMLOptionsCollection* collection = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
+    HTMLOptionsCollection* collection = V8HTMLOptionsCollection::toNative(info.Holder());
     HTMLSelectElement* base = static_cast<HTMLSelectElement*>(collection->base());
     return toOptionsCollectionSetter(index, value, base);
 }
diff --git a/WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
index f814bda..261b5a8 100644
--- a/WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
@@ -45,9 +45,10 @@ namespace WebCore {
 // FIXME: Consider moving getter/setter helpers to V8NPObject and renaming this file to V8PluginElementFunctions
 // to match JSC bindings naming convention.
 
+template <class C>
 static v8::Handle<v8::Value> npObjectNamedGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
-    HTMLPlugInElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLPlugInElement>(info.Holder());
+    HTMLPlugInElement* imp = C::toNative(info.Holder());
     ScriptInstance scriptInstance = imp->getInstance();
     if (!scriptInstance)
         return notHandledByInterceptor();
@@ -59,9 +60,10 @@ static v8::Handle<v8::Value> npObjectNamedGetter(v8::Local<v8::String> name, con
     return npObjectGetNamedProperty(instance, name);
 }
 
+template <class C>
 static v8::Handle<v8::Value> npObjectNamedSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
-    HTMLPlugInElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLPlugInElement>(info.Holder());
+    HTMLPlugInElement* imp = C::toNative(info.Holder());
     ScriptInstance scriptInstance = imp->getInstance();
     if (!scriptInstance)
         return notHandledByInterceptor();
@@ -76,37 +78,37 @@ static v8::Handle<v8::Value> npObjectNamedSetter(v8::Local<v8::String> name, v8:
 v8::Handle<v8::Value> V8HTMLAppletElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLAppletElement.NamedPropertyGetter");
-    return npObjectNamedGetter(name, info);
+    return npObjectNamedGetter<V8HTMLAppletElement>(name, info);
 }
 
 v8::Handle<v8::Value> V8HTMLEmbedElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLEmbedElement.NamedPropertyGetter");
-    return npObjectNamedGetter(name, info);
+    return npObjectNamedGetter<V8HTMLEmbedElement>(name, info);
 }
 
 v8::Handle<v8::Value> V8HTMLObjectElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLObjectElement.NamedPropertyGetter");
-    return npObjectNamedGetter(name, info);
+    return npObjectNamedGetter<V8HTMLObjectElement>(name, info);
 }
 
 v8::Handle<v8::Value> V8HTMLAppletElement::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLAppletElement.NamedPropertySetter");
-    return npObjectNamedSetter(name, value, info);
+    return npObjectNamedSetter<V8HTMLAppletElement>(name, value, info);
 }
 
 v8::Handle<v8::Value> V8HTMLEmbedElement::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLEmbedElement.NamedPropertySetter");
-    return npObjectNamedSetter(name, value, info);
+    return npObjectNamedSetter<V8HTMLEmbedElement>(name, value, info);
 }
 
 v8::Handle<v8::Value> V8HTMLObjectElement::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLObjectElement.NamedPropertySetter");
-    return npObjectNamedSetter(name, value, info);
+    return npObjectNamedSetter<V8HTMLObjectElement>(name, value, info);
 }
 
 v8::Handle<v8::Value> V8HTMLAppletElement::callAsFunctionCallback(const v8::Arguments& args)
@@ -127,10 +129,11 @@ v8::Handle<v8::Value> V8HTMLObjectElement::callAsFunctionCallback(const v8::Argu
     return npObjectInvokeDefaultHandler(args);
 }
 
+template <class C>
 v8::Handle<v8::Value> npObjectIndexedGetter(uint32_t index, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLPlugInElement.IndexedPropertyGetter");
-    HTMLPlugInElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLPlugInElement>(info.Holder());
+    HTMLPlugInElement* imp = C::toNative(info.Holder());
     ScriptInstance scriptInstance = imp->getInstance();
     if (!scriptInstance)
         return notHandledByInterceptor();
@@ -142,10 +145,11 @@ v8::Handle<v8::Value> npObjectIndexedGetter(uint32_t index, const v8::AccessorIn
     return npObjectGetIndexedProperty(instance, index);
 }
 
+template <class C>
 v8::Handle<v8::Value> npObjectIndexedSetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLPlugInElement.IndexedPropertySetter");
-    HTMLPlugInElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLPlugInElement>(info.Holder());
+    HTMLPlugInElement* imp = C::toNative(info.Holder());
     ScriptInstance scriptInstance = imp->getInstance();
     if (!scriptInstance)
         return notHandledByInterceptor();
@@ -160,37 +164,37 @@ v8::Handle<v8::Value> npObjectIndexedSetter(uint32_t index, v8::Local<v8::Value>
 v8::Handle<v8::Value> V8HTMLAppletElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLAppletElement.IndexedPropertyGetter");
-    return npObjectIndexedGetter(index, info);
+    return npObjectIndexedGetter<V8HTMLAppletElement>(index, info);
 }
 
 v8::Handle<v8::Value> V8HTMLEmbedElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLEmbedElement.IndexedPropertyGetter");
-    return npObjectIndexedGetter(index, info);
+    return npObjectIndexedGetter<V8HTMLEmbedElement>(index, info);
 }
 
 v8::Handle<v8::Value> V8HTMLObjectElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLObjectElement.IndexedPropertyGetter");
-    return npObjectIndexedGetter(index, info);
+    return npObjectIndexedGetter<V8HTMLObjectElement>(index, info);
 }
 
 v8::Handle<v8::Value> V8HTMLAppletElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLAppletElement.IndexedPropertySetter");
-    return npObjectIndexedSetter(index, value, info);
+    return npObjectIndexedSetter<V8HTMLAppletElement>(index, value, info);
 }
 
 v8::Handle<v8::Value> V8HTMLEmbedElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLEmbedElement.IndexedPropertySetter");
-    return npObjectIndexedSetter(index, value, info);
+    return npObjectIndexedSetter<V8HTMLEmbedElement>(index, value, info);
 }
 
 v8::Handle<v8::Value> V8HTMLObjectElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLObjectElement.IndexedPropertySetter");
-    return npObjectIndexedSetter(index, value, info);
+    return npObjectIndexedSetter<V8HTMLObjectElement>(index, value, info);
 }
 
 } // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
index 0d84d92..0904b3e 100644
--- a/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
@@ -48,7 +48,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8HTMLSelectElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLSelectElement.NamedPropertyGetter");
-    HTMLSelectElement* select = V8DOMWrapper::convertDOMWrapperToNode<HTMLSelectElement>(info.Holder());
+    HTMLSelectElement* select = V8HTMLSelectElement::toNative(info.Holder());
     v8::Handle<v8::Value> value = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
 
     if (!value.IsEmpty())
@@ -77,7 +77,7 @@ v8::Handle<v8::Value> V8HTMLSelectElement::indexedPropertyGetter(uint32_t index,
 {
     ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
     ASSERT(V8DOMWrapper::domWrapperType(info.Holder()) == V8ClassIndex::NODE);
-    RefPtr<Node> result = V8DOMWrapper::convertDOMWrapperToNode<HTMLSelectElement>(info.Holder())->item(index);
+    RefPtr<Node> result = V8HTMLSelectElement::toNative(info.Holder())->item(index);
     if (!result)
         return notHandledByInterceptor();
 
@@ -87,21 +87,21 @@ v8::Handle<v8::Value> V8HTMLSelectElement::indexedPropertyGetter(uint32_t index,
 v8::Handle<v8::Value> V8HTMLSelectElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.HTMLSelectElement.IndexedPropertySetter");
-    HTMLSelectElement* select = V8DOMWrapper::convertDOMWrapperToNode<HTMLSelectElement>(info.Holder());
+    HTMLSelectElement* select = V8HTMLSelectElement::toNative(info.Holder());
     return toOptionsCollectionSetter(index, value, select);
 }
 
 v8::Handle<v8::Value> V8HTMLSelectElement::removeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.HTMLSelectElement.remove");
-    HTMLSelectElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLSelectElement>(args.Holder());
+    HTMLSelectElement* imp = V8HTMLSelectElement::toNative(args.Holder());
     return removeElement(imp, args);
 }
 
 v8::Handle<v8::Value> removeElement(HTMLSelectElement* imp, const v8::Arguments& args) 
 {
     if (V8HTMLOptionElement::HasInstance(args[0])) {
-        HTMLOptionElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLOptionElement>(v8::Handle<v8::Object>::Cast(args[0]));
+        HTMLOptionElement* element = V8HTMLOptionElement::toNative(v8::Handle<v8::Object>::Cast(args[0]));
         imp->remove(element->index());
         return v8::Undefined();
     }
diff --git a/WebCore/bindings/v8/custom/V8HistoryCustom.cpp b/WebCore/bindings/v8/custom/V8HistoryCustom.cpp
index e919524..6aa0806 100644
--- a/WebCore/bindings/v8/custom/V8HistoryCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HistoryCustom.cpp
@@ -57,7 +57,7 @@ v8::Handle<v8::Value> V8History::pushStateCallback(const v8::Arguments& args)
     }
 
     ExceptionCode ec = 0;
-    History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, args.Holder());
+    History* history = V8History::toNative(args.Holder());
     history->stateObjectAdded(historyState.release(), title, url, History::StateObjectPush, ec);
     return throwError(ec);
 }
@@ -78,7 +78,7 @@ v8::Handle<v8::Value> V8History::replaceStateCallback(const v8::Arguments& args)
     }
 
     ExceptionCode ec = 0;
-    History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, args.Holder());
+    History* history = V8History::toNative(args.Holder());
     history->stateObjectAdded(historyState.release(), title, url, History::StateObjectReplace, ec);
     return throwError(ec);
 }
@@ -87,7 +87,7 @@ bool V8History::indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index,
 {
     ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::HISTORY);
     // Only allow same origin access.
-    History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, host);
+    History* history = V8History::toNative(host);
     return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), history->frame(), false);
 }
 
@@ -95,7 +95,7 @@ bool V8History::namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Val
 {
     ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::HISTORY);
     // Only allow same origin access.
-    History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, host);
+    History* history = V8History::toNative(host);
     return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), history->frame(), false);
 }
 
diff --git a/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
index a98d299..dbed4a3 100644
--- a/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
@@ -41,7 +41,10 @@
 
 #include "V8Binding.h"
 #include "V8CustomBinding.h"
+#include "V8Database.h"
+#include "V8Node.h"
 #include "V8Proxy.h"
+#include "V8Storage.h"
 
 namespace WebCore {
 
@@ -115,7 +118,7 @@ v8::Handle<v8::Value> V8InjectedScriptHost::inspectedWindowCallback(const v8::Ar
 {
     INC_STATS("InjectedScriptHost.inspectedWindow()");
 
-    InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
+    InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
     InspectorController* ic = host->inspectorController();
     if (!ic)
         return v8::Undefined();
@@ -134,7 +137,7 @@ v8::Handle<v8::Value> V8InjectedScriptHost::nodeForIdCallback(const v8::Argument
     if (args.Length() < 1)
         return v8::Undefined();
 
-    InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
+    InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
     
     Node* node = host->nodeForId(args[0]->ToInt32()->Value());
     if (!node)
@@ -153,7 +156,7 @@ v8::Handle<v8::Value> V8InjectedScriptHost::wrapObjectCallback(const v8::Argumen
     if (args.Length() < 2)
         return v8::Undefined();
 
-    InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
+    InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
     return host->wrapObject(ScriptValue(args[0]), toWebCoreStringWithNullCheck(args[1])).v8Value();
 }
 
@@ -163,7 +166,7 @@ v8::Handle<v8::Value> V8InjectedScriptHost::unwrapObjectCallback(const v8::Argum
     if (args.Length() < 1)
         return v8::Undefined();
 
-    InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
+    InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
     return host->unwrapObject(toWebCoreStringWithNullCheck(args[0])).v8Value();
 }
 
@@ -173,8 +176,8 @@ v8::Handle<v8::Value> V8InjectedScriptHost::pushNodePathToFrontendCallback(const
     if (args.Length() < 3)
         return v8::Undefined();
 
-    InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
-    Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
+    InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
+    Node* node = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
     bool withChildren = args[1]->ToBoolean()->Value();
     bool selectInUI = args[2]->ToBoolean()->Value();
     if (node)
@@ -190,7 +193,7 @@ v8::Handle<v8::Value> V8InjectedScriptHost::databaseForIdCallback(const v8::Argu
     if (args.Length() < 1)
         return v8::Undefined();
 
-    InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
+    InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
     Database* database = host->databaseForId(args[0]->ToInt32()->Value());
     if (!database)
         return v8::Undefined();
@@ -203,8 +206,8 @@ v8::Handle<v8::Value> V8InjectedScriptHost::selectDatabaseCallback(const v8::Arg
     if (args.Length() < 1)
         return v8::Undefined();
 
-    InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
-    Database* database = V8DOMWrapper::convertToNativeObject<Database>(V8ClassIndex::DATABASE, v8::Handle<v8::Object>::Cast(args[0]));
+    InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
+    Database* database = V8Database::toNative(v8::Handle<v8::Object>::Cast(args[0]));
     if (database)
         host->selectDatabase(database);
 
@@ -219,8 +222,8 @@ v8::Handle<v8::Value> V8InjectedScriptHost::selectDOMStorageCallback(const v8::A
     if (args.Length() < 1)
         return v8::Undefined();
 
-    InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
-    Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, v8::Handle<v8::Object>::Cast(args[0]));
+    InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
+    Storage* storage = V8Storage::toNative(v8::Handle<v8::Object>::Cast(args[0]));
     if (storage)
         host->selectDOMStorage(storage);
 
diff --git a/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp b/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp
index 3a19d74..ae5b828 100644
--- a/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp
@@ -42,6 +42,7 @@
 
 #include "V8Binding.h"
 #include "V8CustomBinding.h"
+#include "V8Node.h"
 #include "V8Proxy.h"
 
 namespace WebCore {
@@ -53,7 +54,7 @@ v8::Handle<v8::Value> V8InspectorFrontendHost::searchCallback(const v8::Argument
     if (args.Length() < 2)
         return v8::Undefined();
 
-    Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
+    Node* node = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
     if (!node)
         return v8::Undefined();
 
diff --git a/WebCore/bindings/v8/custom/V8LocationCustom.cpp b/WebCore/bindings/v8/custom/V8LocationCustom.cpp
index f83b1a1..ce816b6 100644
--- a/WebCore/bindings/v8/custom/V8LocationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8LocationCustom.cpp
@@ -63,7 +63,7 @@ void V8Location::hashAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Va
 {
     INC_STATS("DOM.Location.hash._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     String hash = toWebCoreString(value);
 
     Frame* frame = imp->frame();
@@ -86,7 +86,7 @@ void V8Location::hostAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Va
 {
     INC_STATS("DOM.Location.host._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     String host = toWebCoreString(value);
 
     Frame* frame = imp->frame();
@@ -106,7 +106,7 @@ void V8Location::hostnameAccessorSetter(v8::Local<v8::String> name, v8::Local<v8
 {
     INC_STATS("DOM.Location.hostname._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     String hostname = toWebCoreString(value);
 
     Frame* frame = imp->frame();
@@ -123,7 +123,7 @@ void V8Location::hrefAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Va
 {
     INC_STATS("DOM.Location.href._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
 
     Frame* frame = imp->frame();
     if (!frame)
@@ -143,7 +143,7 @@ void V8Location::pathnameAccessorSetter(v8::Local<v8::String> name, v8::Local<v8
 {
     INC_STATS("DOM.Location.pathname._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     String pathname = toWebCoreString(value);
 
     Frame* frame = imp->frame();
@@ -160,7 +160,7 @@ void V8Location::portAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Va
 {
     INC_STATS("DOM.Location.port._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     String port = toWebCoreString(value);
 
     Frame* frame = imp->frame();
@@ -177,7 +177,7 @@ void V8Location::protocolAccessorSetter(v8::Local<v8::String> name, v8::Local<v8
 {
     INC_STATS("DOM.Location.protocol._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     String protocol = toWebCoreString(value);
 
     Frame* frame = imp->frame();
@@ -194,7 +194,7 @@ void V8Location::searchAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::
 {
     INC_STATS("DOM.Location.search._set");
     v8::Handle<v8::Object> holder = info.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     String query = toWebCoreString(value);
 
     Frame* frame = imp->frame();
@@ -217,7 +217,7 @@ v8::Handle<v8::Value> V8Location::reloadAccessorGetter(v8::Local<v8::String> nam
         // domain security check already
         return privateTemplate->GetFunction();
     }
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false)) {
         static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(V8Location::reloadCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
         return sharedTemplate->GetFunction();
@@ -235,7 +235,7 @@ v8::Handle<v8::Value> V8Location::replaceAccessorGetter(v8::Local<v8::String> na
         // domain security check already
         return privateTemplate->GetFunction();
     }
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false)) {
         static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(V8Location::replaceCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
         return sharedTemplate->GetFunction();
@@ -254,7 +254,7 @@ v8::Handle<v8::Value> V8Location::assignAccessorGetter(v8::Local<v8::String> nam
         // domain security check already
         return privateTemplate->GetFunction();
     }
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false)) {
         static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(V8Location::assignCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
         return sharedTemplate->GetFunction();
@@ -268,7 +268,7 @@ v8::Handle<v8::Value> V8Location::reloadCallback(const v8::Arguments& args)
 
     INC_STATS("DOM.Location.reload");
     v8::Handle<v8::Object> holder = args.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
 
     Frame* frame = imp->frame();
     if (!frame || !ScriptController::isSafeScript(frame))
@@ -283,7 +283,7 @@ v8::Handle<v8::Value> V8Location::replaceCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Location.replace");
     v8::Handle<v8::Object> holder = args.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
 
     Frame* frame = imp->frame();
     if (!frame)
@@ -304,7 +304,7 @@ v8::Handle<v8::Value> V8Location::assignCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Location.assign");
     v8::Handle<v8::Object> holder = args.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
 
     Frame* frame = imp->frame();
     if (!frame)
@@ -335,7 +335,7 @@ v8::Handle<v8::Value> V8Location::toStringCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Location.toString");
     v8::Handle<v8::Object> holder = args.Holder();
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+    Location* imp = V8Location::toNative(holder);
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
         return v8::Undefined();
     String result = imp->href();
@@ -346,7 +346,7 @@ bool V8Location::indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index
 {
     ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::LOCATION);
     // Only allow same origin access
-    Location* imp =  V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, host);
+    Location* imp =  V8Location::toNative(host);
     return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false);
 }
 
@@ -354,7 +354,7 @@ bool V8Location::namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Va
 {
     ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::LOCATION);
     // Only allow same origin access
-    Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, host);
+    Location* imp = V8Location::toNative(host);
     return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false);
 }
 
diff --git a/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp b/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
index 7eb10e1..b291d1a 100644
--- a/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
@@ -45,7 +45,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8MessageEvent::portsAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.MessageEvent.ports");
-    MessageEvent* event = V8DOMWrapper::convertToNativeObject<MessageEvent>(V8ClassIndex::MESSAGEEVENT, info.Holder());
+    MessageEvent* event = V8MessageEvent::toNative(info.Holder());
 
     MessagePortArray* ports = event->ports();
     if (!ports || ports->isEmpty())
@@ -61,14 +61,14 @@ v8::Handle<v8::Value> V8MessageEvent::portsAccessorGetter(v8::Local<v8::String>
 v8::Handle<v8::Value> V8MessageEvent::initMessageEventCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.MessageEvent.initMessageEvent");
-    MessageEvent* event = V8DOMWrapper::convertToNativeObject<MessageEvent>(V8ClassIndex::MESSAGEEVENT, args.Holder());
+    MessageEvent* event = V8MessageEvent::toNative(args.Holder());
     String typeArg = v8ValueToWebCoreString(args[0]);
     bool canBubbleArg = args[1]->BooleanValue();
     bool cancelableArg = args[2]->BooleanValue();
     RefPtr<SerializedScriptValue> dataArg = SerializedScriptValue::create(v8ValueToWebCoreString(args[3]));
     String originArg = v8ValueToWebCoreString(args[4]);
     String lastEventIdArg = v8ValueToWebCoreString(args[5]);
-    DOMWindow* sourceArg = V8DOMWindow::HasInstance(args[6]) ? V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, v8::Handle<v8::Object>::Cast(args[6])) : 0;
+    DOMWindow* sourceArg = V8DOMWindow::HasInstance(args[6]) ? V8DOMWindow::toNative(v8::Handle<v8::Object>::Cast(args[6])) : 0;
     OwnPtr<MessagePortArray> portArray;
 
     if (!isUndefinedOrNull(args[7])) {
diff --git a/WebCore/bindings/v8/custom/V8MessagePortCustom.cpp b/WebCore/bindings/v8/custom/V8MessagePortCustom.cpp
index 01be661..071b1ac 100644
--- a/WebCore/bindings/v8/custom/V8MessagePortCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8MessagePortCustom.cpp
@@ -46,7 +46,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8MessagePort::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.MessagePort.addEventListener()");
-    MessagePort* messagePort = V8DOMWrapper::convertToNativeObject<MessagePort>(V8ClassIndex::MESSAGEPORT, args.Holder());
+    MessagePort* messagePort = V8MessagePort::toNative(args.Holder());
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(messagePort, args[1], false, ListenerFindOrCreate);
     if (listener) {
         String type = toWebCoreString(args[0]);
@@ -61,7 +61,7 @@ v8::Handle<v8::Value> V8MessagePort::addEventListenerCallback(const v8::Argument
 v8::Handle<v8::Value> V8MessagePort::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.MessagePort.removeEventListener()");
-    MessagePort* messagePort = V8DOMWrapper::convertToNativeObject<MessagePort>(V8ClassIndex::MESSAGEPORT, args.Holder());
+    MessagePort* messagePort = V8MessagePort::toNative(args.Holder());
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(messagePort, args[1], false, ListenerFindOnly);
     if (listener) {
         String type = toWebCoreString(args[0]);
@@ -77,7 +77,7 @@ v8::Handle<v8::Value> V8MessagePort::removeEventListenerCallback(const v8::Argum
 v8::Handle<v8::Value> V8MessagePort::postMessageCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.MessagePort.postMessage");
-    MessagePort* messagePort = V8DOMWrapper::convertToNativeObject<MessagePort>(V8ClassIndex::MESSAGEPORT, args.Holder());
+    MessagePort* messagePort = V8MessagePort::toNative(args.Holder());
     RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(toWebCoreString(args[0]));
     MessagePortArray portArray;
     if (args.Length() > 1) {
@@ -129,7 +129,7 @@ bool getMessagePortArray(v8::Local<v8::Value> value, MessagePortArray& portArray
             throwError("MessagePortArray argument must contain only MessagePorts");
             return false;
         }
-        portArray[i] = V8DOMWrapper::convertToNativeObject<MessagePort>(V8ClassIndex::MESSAGEPORT, v8::Handle<v8::Object>::Cast(port));
+        portArray[i] = V8MessagePort::toNative(v8::Handle<v8::Object>::Cast(port));
     }
     return true;
 }
diff --git a/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp b/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
index b7ff7ed..c7fff5a 100644
--- a/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
@@ -43,7 +43,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8NamedNodeMap::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.NamedNodeMap.IndexedPropertyGetter");
-    NamedNodeMap* imp = V8DOMWrapper::convertToNativeObject<NamedNodeMap>(V8ClassIndex::NAMEDNODEMAP, info.Holder());
+    NamedNodeMap* imp = V8NamedNodeMap::toNative(info.Holder());
     RefPtr<Node> result = imp->item(index);
     if (!result)
         return notHandledByInterceptor();
@@ -64,7 +64,7 @@ v8::Handle<v8::Value> V8NamedNodeMap::namedPropertyGetter(v8::Local<v8::String>
         return notHandledByInterceptor();
 
     // Finally, search the DOM.
-    NamedNodeMap* imp = V8DOMWrapper::convertToNativeObject<NamedNodeMap>(V8ClassIndex::NAMEDNODEMAP, info.Holder());
+    NamedNodeMap* imp = V8NamedNodeMap::toNative(info.Holder());
     RefPtr<Node> result = imp->getNamedItem(toWebCoreString(name));
     if (!result)
         return notHandledByInterceptor();
diff --git a/WebCore/bindings/v8/custom/V8NodeCustom.cpp b/WebCore/bindings/v8/custom/V8NodeCustom.cpp
index 52f6fc0..79afbe8 100644
--- a/WebCore/bindings/v8/custom/V8NodeCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NodeCustom.cpp
@@ -48,7 +48,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8Node::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Node.addEventListener()");
-    Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(args.Holder());
+    Node* node = V8Node::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(node, args[1], false, ListenerFindOrCreate);
     if (listener) {
@@ -63,7 +63,7 @@ v8::Handle<v8::Value> V8Node::addEventListenerCallback(const v8::Arguments& args
 v8::Handle<v8::Value> V8Node::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Node.removeEventListener()");
-    Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(args.Holder());
+    Node* node = V8Node::toNative(args.Holder());
 
     // It is possbile that the owner document of the node is detached
     // from the frame.
@@ -84,10 +84,10 @@ v8::Handle<v8::Value> V8Node::insertBeforeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Node.insertBefore");
     v8::Handle<v8::Object> holder = args.Holder();
-    Node* imp = V8DOMWrapper::convertDOMWrapperToNode<Node>(holder);
+    Node* imp = V8Node::toNative(holder);
     ExceptionCode ec = 0;
-    Node* newChild = V8Node::HasInstance(args[0]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0])) : 0;
-    Node* refChild = V8Node::HasInstance(args[1]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[1])) : 0;
+    Node* newChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+    Node* refChild = V8Node::HasInstance(args[1]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0;
     bool success = imp->insertBefore(newChild, refChild, ec, true);
     if (ec) {
         V8Proxy::setDOMException(ec);
@@ -103,10 +103,10 @@ v8::Handle<v8::Value> V8Node::replaceChildCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Node.replaceChild");
     v8::Handle<v8::Object> holder = args.Holder();
-    Node* imp = V8DOMWrapper::convertDOMWrapperToNode<Node>(holder);
+    Node* imp = V8Node::toNative(holder);
     ExceptionCode ec = 0;
-    Node* newChild = V8Node::HasInstance(args[0]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0])) : 0;
-    Node* oldChild = V8Node::HasInstance(args[1]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[1])) : 0;
+    Node* newChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+    Node* oldChild = V8Node::HasInstance(args[1]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0;
     bool success = imp->replaceChild(newChild, oldChild, ec, true);
     if (ec) {
         V8Proxy::setDOMException(ec);
@@ -121,9 +121,9 @@ v8::Handle<v8::Value> V8Node::removeChildCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Node.removeChild");
     v8::Handle<v8::Object> holder = args.Holder();
-    Node* imp = V8DOMWrapper::convertDOMWrapperToNode<Node>(holder);
+    Node* imp = V8Node::toNative(holder);
     ExceptionCode ec = 0;
-    Node* oldChild = V8Node::HasInstance(args[0]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+    Node* oldChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
     bool success = imp->removeChild(oldChild, ec);
     if (ec) {
         V8Proxy::setDOMException(ec);
@@ -139,9 +139,9 @@ v8::Handle<v8::Value> V8Node::appendChildCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Node.appendChild");
     v8::Handle<v8::Object> holder = args.Holder();
-    Node* imp = V8DOMWrapper::convertDOMWrapperToNode<Node>(holder);
+    Node* imp = V8Node::toNative(holder);
     ExceptionCode ec = 0;
-    Node* newChild = V8Node::HasInstance(args[0]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+    Node* newChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
     bool success = imp->appendChild(newChild, ec, true );
     if (ec) {
         V8Proxy::setDOMException(ec);
diff --git a/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp b/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp
index 6111807..1c077f7 100644
--- a/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp
@@ -60,7 +60,7 @@ static inline v8::Handle<v8::Value> toV8(PassRefPtr<Node> object, ExceptionCode
 v8::Handle<v8::Value> V8NodeIterator::nextNodeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.NodeIterator.nextNode()");
-    NodeIterator* nodeIterator = V8DOMWrapper::convertToNativeObject<NodeIterator>(V8ClassIndex::NODEITERATOR, args.Holder());
+    NodeIterator* nodeIterator = V8NodeIterator::toNative(args.Holder());
 
     ExceptionCode ec = 0;
     ScriptState state;
@@ -71,7 +71,7 @@ v8::Handle<v8::Value> V8NodeIterator::nextNodeCallback(const v8::Arguments& args
 v8::Handle<v8::Value> V8NodeIterator::previousNodeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.NodeIterator.previousNode()");
-    NodeIterator* nodeIterator = V8DOMWrapper::convertToNativeObject<NodeIterator>(V8ClassIndex::NODEITERATOR, args.Holder());
+    NodeIterator* nodeIterator = V8NodeIterator::toNative(args.Holder());
 
     ExceptionCode ec = 0;
     ScriptState state;
diff --git a/WebCore/bindings/v8/custom/V8NodeListCustom.cpp b/WebCore/bindings/v8/custom/V8NodeListCustom.cpp
index 0af3f96..5721a7e 100644
--- a/WebCore/bindings/v8/custom/V8NodeListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NodeListCustom.cpp
@@ -45,7 +45,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8NodeList::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.NodeList.NamedPropertyGetter");
-    NodeList* list = V8DOMWrapper::convertToNativeObject<NodeList>(V8ClassIndex::NODELIST, info.Holder());
+    NodeList* list = V8NodeList::toNative(info.Holder());
     String key = toWebCoreString(name);
 
     // Length property cannot be overridden.
@@ -67,7 +67,7 @@ v8::Handle<v8::Value> V8NodeList::callAsFunctionCallback(const v8::Arguments& ar
     if (args.Length() < 1)
         return v8::Undefined();
 
-    NodeList* list = V8DOMWrapper::convertToNativeObject<NodeList>(V8ClassIndex::NODELIST, args.Holder());
+    NodeList* list = V8NodeList::toNative(args.Holder());
 
     // The first argument must be a number.
     v8::Local<v8::Uint32> index = args[0]->ToArrayIndex();
diff --git a/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp b/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp
index 5e464ea..1cb4554 100644
--- a/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp
@@ -51,7 +51,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8Notification::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Notification.addEventListener()");
-    Notification* notification = V8DOMWrapper::convertToNativeObject<Notification>(V8ClassIndex::NOTIFICATION, args.Holder());
+    Notification* notification = V8Notification::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(notification, args[1], false, ListenerFindOrCreate);
     if (listener) {
@@ -67,7 +67,7 @@ v8::Handle<v8::Value> V8Notification::addEventListenerCallback(const v8::Argumen
 v8::Handle<v8::Value> V8Notification::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Notification.removeEventListener()");
-    Notification* notification = V8DOMWrapper::convertToNativeObject<Notification>(V8ClassIndex::NOTIFICATION, args.Holder());
+    Notification* notification = V8Notification::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(notification, args[1], false, ListenerFindOnly);
     if (listener) {
@@ -83,7 +83,7 @@ v8::Handle<v8::Value> V8Notification::removeEventListenerCallback(const v8::Argu
 v8::Handle<v8::Value> V8NotificationCenter::createHTMLNotificationCallback(const v8::Arguments& args)
 {
     INC_STATS(L"DOM.NotificationCenter.CreateHTMLNotification()");
-    NotificationCenter* notificationCenter = V8DOMWrapper::convertToNativeObject<NotificationCenter>(V8ClassIndex::NOTIFICATIONCENTER, args.Holder());
+    NotificationCenter* notificationCenter = V8NotificationCenter::toNative(args.Holder());
 
     ExceptionCode ec = 0;
     String url = toWebCoreString(args[0]);
@@ -101,7 +101,7 @@ v8::Handle<v8::Value> V8NotificationCenter::createHTMLNotificationCallback(const
 v8::Handle<v8::Value> V8NotificationCenter::createNotificationCallback(const v8::Arguments& args)
 {
     INC_STATS(L"DOM.NotificationCenter.CreateNotification()");
-    NotificationCenter* notificationCenter = V8DOMWrapper::convertToNativeObject<NotificationCenter>(V8ClassIndex::NOTIFICATIONCENTER, args.Holder());
+    NotificationCenter* notificationCenter = V8NotificationCenter::toNative(args.Holder());
 
     ExceptionCode ec = 0;
     RefPtr<Notification> notification = notificationCenter->createNotification(toWebCoreString(args[0]), toWebCoreString(args[1]), toWebCoreString(args[2]), ec);
@@ -118,7 +118,7 @@ v8::Handle<v8::Value> V8NotificationCenter::createNotificationCallback(const v8:
 v8::Handle<v8::Value> V8NotificationCenter::requestPermissionCallback(const v8::Arguments& args)
 {
     INC_STATS(L"DOM.NotificationCenter.RequestPermission()");
-    NotificationCenter* notificationCenter = V8DOMWrapper::convertToNativeObject<NotificationCenter>(V8ClassIndex::NOTIFICATIONCENTER, args.Holder());
+    NotificationCenter* notificationCenter = V8NotificationCenter::toNative(args.Holder());
     ScriptExecutionContext* context = notificationCenter->context();
 
     // Requesting permission is only valid from a page context.
diff --git a/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp b/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
index d683025..99cc2d1 100644
--- a/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
@@ -46,7 +46,7 @@ v8::Handle<v8::Value> V8PopStateEvent::initPopStateEventCallback(const v8::Argum
     bool cancelableArg = args[2]->BooleanValue();
     RefPtr<SerializedScriptValue> stateArg = SerializedScriptValue::create(v8ValueToWebCoreString(args[3]));
 
-    PopStateEvent* event = V8DOMWrapper::convertToNativeObject<PopStateEvent>(V8ClassIndex::POPSTATEEVENT, args.Holder());
+    PopStateEvent* event = V8PopStateEvent::toNative(args.Holder());
     event->initPopStateEvent(typeArg, canBubbleArg, cancelableArg, stateArg.release());
 
     return v8::Undefined();
@@ -56,7 +56,7 @@ v8::Handle<v8::Value> V8PopStateEvent::stateAccessorGetter(v8::Local<v8::String>
 {
     INC_STATS("DOM.PopStateEvent.state");
 
-    PopStateEvent* event = V8DOMWrapper::convertToNativeObject<PopStateEvent>(V8ClassIndex::POPSTATEEVENT, info.Holder());
+    PopStateEvent* event = V8PopStateEvent::toNative(info.Holder());
     SerializedScriptValue* state = event->state();
     if (!state)
         return v8::Null();
diff --git a/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp b/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp
index be90acf..ab58d1c 100644
--- a/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp
@@ -54,7 +54,7 @@ v8::Handle<v8::Value> V8SQLResultSetRowList::itemCallback(const v8::Arguments& a
         return v8::Undefined();
     }
 
-    SQLResultSetRowList* rowList = V8DOMWrapper::convertToNativeObject<SQLResultSetRowList>(V8ClassIndex::SQLRESULTSETROWLIST, args.Holder());
+    SQLResultSetRowList* rowList = V8SQLResultSetRowList::toNative(args.Holder());
 
     unsigned long index = args[0]->IntegerValue();
     if (index < 0 || index >= rowList->length()) {
diff --git a/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp b/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
index 8dc940b..98fbd9a 100644
--- a/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
@@ -96,7 +96,7 @@ v8::Handle<v8::Value> V8SQLTransaction::executeSqlCallback(const v8::Arguments&
             return throwError("sqlArgs should be array or object!", V8Proxy::TypeError);
     }
 
-    SQLTransaction* transaction = V8DOMWrapper::convertToNativeObject<SQLTransaction>(V8ClassIndex::SQLTRANSACTION, args.Holder());
+    SQLTransaction* transaction = V8SQLTransaction::toNative(args.Holder());
 
     Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
 
diff --git a/WebCore/bindings/v8/custom/V8SVGElementInstanceCustom.cpp b/WebCore/bindings/v8/custom/V8SVGElementInstanceCustom.cpp
index b1df0df..23b5b06 100644
--- a/WebCore/bindings/v8/custom/V8SVGElementInstanceCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SVGElementInstanceCustom.cpp
@@ -47,7 +47,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8SVGElementInstance::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.SVGElementInstance.AddEventListener()");
-    SVGElementInstance* instance = V8DOMWrapper::convertDOMWrapperToNative<SVGElementInstance>(args.Holder());
+    SVGElementInstance* instance = V8SVGElementInstance::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(instance, args[1], false, ListenerFindOrCreate);
     if (listener) {
@@ -63,7 +63,7 @@ v8::Handle<v8::Value> V8SVGElementInstance::addEventListenerCallback(const v8::A
 v8::Handle<v8::Value> V8SVGElementInstance::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.SVGElementInstance.RemoveEventListener()");
-    SVGElementInstance* instance = V8DOMWrapper::convertDOMWrapperToNative<SVGElementInstance>(args.Holder());
+    SVGElementInstance* instance = V8SVGElementInstance::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(instance, args[1], false, ListenerFindOnly);
     if (listener) {
diff --git a/WebCore/bindings/v8/custom/V8SVGLengthCustom.cpp b/WebCore/bindings/v8/custom/V8SVGLengthCustom.cpp
index ce345d1..129801d 100644
--- a/WebCore/bindings/v8/custom/V8SVGLengthCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SVGLengthCustom.cpp
@@ -44,7 +44,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8SVGLength::valueAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.SVGLength.value");
-    V8SVGPODTypeWrapper<SVGLength>* wrapper = V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<SVGLength> >(V8ClassIndex::SVGLENGTH, info.Holder());
+    V8SVGPODTypeWrapper<SVGLength>* wrapper = V8SVGPODTypeWrapper<SVGLength>::toNative(info.Holder());
     SVGLength imp = *wrapper;
     return v8::Number::New(imp.value(V8Proxy::svgContext(wrapper)));
 }
@@ -52,7 +52,7 @@ v8::Handle<v8::Value> V8SVGLength::valueAccessorGetter(v8::Local<v8::String> nam
 v8::Handle<v8::Value> V8SVGLength::convertToSpecifiedUnitsCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.SVGLength.convertToSpecifiedUnits");
-    V8SVGPODTypeWrapper<SVGLength>* wrapper = V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<SVGLength> >(V8ClassIndex::SVGLENGTH, args.Holder());
+    V8SVGPODTypeWrapper<SVGLength>* wrapper = V8SVGPODTypeWrapper<SVGLength>::toNative(args.Holder());
     SVGLength imp = *wrapper;
     SVGElement* context = V8Proxy::svgContext(wrapper);
     imp.convertToSpecifiedUnits(toInt32(args[0]), context);
diff --git a/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp b/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
index a88166c..78284cd 100644
--- a/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
@@ -53,8 +53,8 @@ v8::Handle<v8::Value> V8SVGMatrix::multiplyCallback(const v8::Arguments& args)
     if (!V8SVGMatrix::HasInstance(args[0]))
         return throwError("secondMatrix argument was not a SVGMatrix");
 
-    TransformationMatrix m1 = *V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >(V8ClassIndex::SVGMATRIX, args.Holder());
-    TransformationMatrix m2 = *V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >(V8ClassIndex::SVGMATRIX, v8::Handle<v8::Object>::Cast(args[0]));
+    TransformationMatrix m1 = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(args.Holder());
+    TransformationMatrix m2 = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(v8::Handle<v8::Object>::Cast(args[0]));
 
     return V8DOMWrapper::convertToV8Object(V8ClassIndex::SVGMATRIX, V8SVGStaticPODTypeWrapper<TransformationMatrix>::create(m1.multLeft(m2)));
 }
@@ -62,7 +62,7 @@ v8::Handle<v8::Value> V8SVGMatrix::multiplyCallback(const v8::Arguments& args)
 v8::Handle<v8::Value> V8SVGMatrix::inverseCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.SVGMatrix.inverse()");
-    TransformationMatrix matrix = *V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >(V8ClassIndex::SVGMATRIX, args.Holder());
+    TransformationMatrix matrix = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(args.Holder());
     ExceptionCode ec = 0;
     TransformationMatrix result = matrix.inverse();
 
@@ -80,7 +80,7 @@ v8::Handle<v8::Value> V8SVGMatrix::inverseCallback(const v8::Arguments& args)
 v8::Handle<v8::Value> V8SVGMatrix::rotateFromVectorCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.SVGMatrix.rotateFromVector()");
-    TransformationMatrix matrix = *V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >(V8ClassIndex::SVGMATRIX, args.Holder());
+    TransformationMatrix matrix = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(args.Holder());
     ExceptionCode ec = 0;
     float x = toFloat(args[0]);
     float y = toFloat(args[1]);
diff --git a/WebCore/bindings/v8/custom/V8StorageCustom.cpp b/WebCore/bindings/v8/custom/V8StorageCustom.cpp
index 396d333..ff3ac5e 100644
--- a/WebCore/bindings/v8/custom/V8StorageCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8StorageCustom.cpp
@@ -43,7 +43,7 @@ namespace WebCore {
 // Get an array containing the names of indexed properties in a collection.
 v8::Handle<v8::Array> V8Storage::namedPropertyEnumerator(const v8::AccessorInfo& info)
 {
-    Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
+    Storage* storage = V8Storage::toNative(info.Holder());
     unsigned int length = storage->length();
     v8::Handle<v8::Array> properties = v8::Array::New(length);
     for (unsigned int i = 0; i < length; ++i) {
@@ -58,7 +58,7 @@ v8::Handle<v8::Array> V8Storage::namedPropertyEnumerator(const v8::AccessorInfo&
 
 static v8::Handle<v8::Value> storageGetter(v8::Local<v8::String> v8Name, const v8::AccessorInfo& info)
 {
-    Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
+    Storage* storage = V8Storage::toNative(info.Holder());
     String name = toWebCoreString(v8Name);
 
     if (storage->contains(name) && name != "length")
@@ -82,7 +82,7 @@ v8::Handle<v8::Value> V8Storage::namedPropertyGetter(v8::Local<v8::String> name,
 
 static v8::Handle<v8::Value> storageSetter(v8::Local<v8::String> v8Name, v8::Local<v8::Value> v8Value, const v8::AccessorInfo& info)
 {
-    Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
+    Storage* storage = V8Storage::toNative(info.Holder());
     String name = toWebCoreString(v8Name);
     String value = toWebCoreString(v8Value);
 
@@ -117,7 +117,7 @@ v8::Handle<v8::Value> V8Storage::namedPropertySetter(v8::Local<v8::String> name,
 
 static v8::Handle<v8::Boolean> storageDeleter(v8::Local<v8::String> v8Name, const v8::AccessorInfo& info)
 {
-    Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
+    Storage* storage = V8Storage::toNative(info.Holder());
     String name = toWebCoreString(v8Name);
     
     if (storage->contains(name)) {
diff --git a/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp b/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
index aa532bb..a718451 100644
--- a/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
@@ -47,7 +47,7 @@ v8::Handle<v8::Value> V8StyleSheetList::namedPropertyGetter(v8::Local<v8::String
         return notHandledByInterceptor();
 
     // Search style sheet.
-    StyleSheetList* imp = V8DOMWrapper::convertToNativeObject<StyleSheetList>(V8ClassIndex::STYLESHEETLIST, info.Holder());
+    StyleSheetList* imp = V8StyleSheetList::toNative(info.Holder());
     HTMLStyleElement* item = imp->getNamedItem(toWebCoreString(name));
     if (!item)
         return notHandledByInterceptor();
diff --git a/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp b/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp
index 08a8088..ecf217c 100644
--- a/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp
@@ -58,7 +58,7 @@ static inline v8::Handle<v8::Value> toV8(PassRefPtr<Node> object, ScriptState* s
 v8::Handle<v8::Value> V8TreeWalker::parentNodeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.TreeWalker.parentNode()");
-    TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+    TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
 
     ScriptState state;
     RefPtr<Node> result = treeWalker->parentNode(&state);
@@ -68,7 +68,7 @@ v8::Handle<v8::Value> V8TreeWalker::parentNodeCallback(const v8::Arguments& args
 v8::Handle<v8::Value> V8TreeWalker::firstChildCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.TreeWalker.firstChild()");
-    TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+    TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
 
     ScriptState state;
     RefPtr<Node> result = treeWalker->firstChild(&state);
@@ -78,7 +78,7 @@ v8::Handle<v8::Value> V8TreeWalker::firstChildCallback(const v8::Arguments& args
 v8::Handle<v8::Value> V8TreeWalker::lastChildCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.TreeWalker.lastChild()");
-    TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+    TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
 
     ScriptState state;
     RefPtr<Node> result = treeWalker->lastChild(&state);
@@ -88,7 +88,7 @@ v8::Handle<v8::Value> V8TreeWalker::lastChildCallback(const v8::Arguments& args)
 v8::Handle<v8::Value> V8TreeWalker::nextNodeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.TreeWalker.nextNode()");
-    TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+    TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
 
     ScriptState state;
     RefPtr<Node> result = treeWalker->nextNode(&state);
@@ -98,7 +98,7 @@ v8::Handle<v8::Value> V8TreeWalker::nextNodeCallback(const v8::Arguments& args)
 v8::Handle<v8::Value> V8TreeWalker::previousNodeCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.TreeWalker.previousNode()");
-    TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+    TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
 
     ScriptState state;
     RefPtr<Node> result = treeWalker->previousNode(&state);
@@ -108,7 +108,7 @@ v8::Handle<v8::Value> V8TreeWalker::previousNodeCallback(const v8::Arguments& ar
 v8::Handle<v8::Value> V8TreeWalker::nextSiblingCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.TreeWalker.nextSibling()");
-    TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+    TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
 
     ScriptState state;
     RefPtr<Node> result = treeWalker->nextSibling(&state);
@@ -118,7 +118,7 @@ v8::Handle<v8::Value> V8TreeWalker::nextSiblingCallback(const v8::Arguments& arg
 v8::Handle<v8::Value> V8TreeWalker::previousSiblingCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.TreeWalker.previousSibling()");
-    TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+    TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
 
     ScriptState state;
     RefPtr<Node> result = treeWalker->previousSibling(&state);
diff --git a/WebCore/bindings/v8/custom/V8WebGLArrayCustom.h b/WebCore/bindings/v8/custom/V8WebGLArrayCustom.h
index a9df7c7..6a702f5 100644
--- a/WebCore/bindings/v8/custom/V8WebGLArrayCustom.h
+++ b/WebCore/bindings/v8/custom/V8WebGLArrayCustom.h
@@ -75,9 +75,7 @@ v8::Handle<v8::Value> constructWebGLArray(const v8::Arguments& args,
         if (argLen > 3)
             return throwError("Wrong number of arguments to new WebGL<T>Array(WebGLArrayBuffer, int, int)");
 
-        WebGLArrayBuffer* buf =
-                V8DOMWrapper::convertToNativeObject<WebGLArrayBuffer>(V8ClassIndex::WEBGLARRAYBUFFER,
-                                                                      args[0]->ToObject());
+        WebGLArrayBuffer* buf = V8WebGLArrayBuffer::toNative(args[0]->ToObject());
         if (buf == NULL)
             return throwError("Could not convert argument 0 to a WebGLArrayBuffer");
         bool ok;
@@ -155,7 +153,7 @@ v8::Handle<v8::Value> getWebGLArrayElement(const v8::Arguments& args,
         V8Proxy::setDOMException(SYNTAX_ERR);
         return notHandledByInterceptor();
     }
-    T* array = V8DOMWrapper::convertToNativeObject<T>(wrapperType, args.Holder());
+    T* array = reinterpret_cast<T*>(args.Holder()->GetPointerFromInternalField(v8DOMWrapperObjectIndex));
     if (index >= array->length())
         return v8::Undefined();
     ElementType result;
@@ -193,7 +191,7 @@ v8::Handle<v8::Value> setWebGLArray(const v8::Arguments& args,
         return notHandledByInterceptor();
     }
 
-    CPlusPlusArrayType* array = V8DOMWrapper::convertToNativeObject<CPlusPlusArrayType>(wrapperType, args.Holder());
+    CPlusPlusArrayType* array = JavaScriptWrapperArrayType::toNative(args.Holder());
 
     if (args.Length() == 2 && args[0]->IsInt32()) {
         // void set(in unsigned long index, in {long|float} value);
@@ -204,7 +202,7 @@ v8::Handle<v8::Value> setWebGLArray(const v8::Arguments& args,
 
     if (JavaScriptWrapperArrayType::HasInstance(args[0])) {
         // void set(in WebGL<T>Array array, [Optional] in unsigned long offset);
-        CPlusPlusArrayType* src = V8DOMWrapper::convertToNativeObject<CPlusPlusArrayType>(wrapperType, args[0]->ToObject());
+        CPlusPlusArrayType* src = JavaScriptWrapperArrayType::toNative(args[0]->ToObject());
         uint32_t offset = 0;
         if (args.Length() == 2)
             offset = toInt32(args[1]);
diff --git a/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
index eacd16c..19b73d4 100644
--- a/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
@@ -115,8 +115,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::bufferDataCallback(const v8::Argu
         return notHandledByInterceptor();
     }
 
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     bool ok;
     int target = toInt32(args[0], ok);
     if (!ok) {
@@ -133,7 +132,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::bufferDataCallback(const v8::Argu
         ExceptionCode exceptionCode;
         context->bufferData(target, size, usage, exceptionCode);
     } else if (V8WebGLArray::HasInstance(args[1])) {
-        WebGLArray* array = V8DOMWrapper::convertToNativeObject<WebGLArray>(V8ClassIndex::WEBGLARRAY, args[1]->ToObject());
+        WebGLArray* array = V8WebGLArray::toNative(args[1]->ToObject());
         ExceptionCode exceptionCode;
         context->bufferData(target, array, usage, exceptionCode);
     } else {
@@ -154,8 +153,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::bufferSubDataCallback(const v8::A
         return notHandledByInterceptor();
     }
 
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     bool ok;
     int target = toInt32(args[0], ok);
     if (!ok) {
@@ -171,7 +169,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::bufferSubDataCallback(const v8::A
         V8Proxy::setDOMException(SYNTAX_ERR);
         return notHandledByInterceptor();
     }
-    WebGLArray* array = V8DOMWrapper::convertToNativeObject<WebGLArray>(V8ClassIndex::WEBGLARRAY, args[2]->ToObject());
+    WebGLArray* array = V8WebGLArray::toNative(args[2]->ToObject());
     ExceptionCode exceptionCode;
     context->bufferSubData(target, offset, array, exceptionCode);
     return v8::Undefined();
@@ -228,8 +226,7 @@ static v8::Handle<v8::Value> getObjectParameter(const v8::Arguments& args, Objec
     }
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     bool ok;
     unsigned target = toInt32(args[0], ok);
     if (!ok) {
@@ -272,8 +269,7 @@ static WebGLUniformLocation* toWebGLUniformLocation(v8::Handle<v8::Value> value,
     ok = false;
     WebGLUniformLocation* location = 0;
     if (V8WebGLUniformLocation::HasInstance(value)) {
-        location = V8DOMWrapper::convertToNativeObject<WebGLUniformLocation>(
-            V8ClassIndex::WEBGLUNIFORMLOCATION, value->ToObject());
+        location = V8WebGLUniformLocation::toNative(value->ToObject());
         ok = true;
     }
     return location;
@@ -299,8 +295,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::getFramebufferAttachmentParameter
     }
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     bool ok;
     unsigned target = toInt32(args[0], ok);
     if (!ok) {
@@ -335,8 +330,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::getParameterCallback(const v8::Ar
     }
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     bool ok;
     unsigned pname = toInt32(args[0], ok);
     if (!ok) {
@@ -361,8 +355,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::getProgramParameterCallback(const
     }
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     WebGLProgram* program = V8WebGLProgram::HasInstance(args[0]) ? V8WebGLProgram::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
     bool ok;
     unsigned pname = toInt32(args[1], ok);
@@ -394,8 +387,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::getShaderParameterCallback(const
     }
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     WebGLShader* shader = V8WebGLShader::HasInstance(args[0]) ? V8WebGLShader::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
     bool ok;
     unsigned pname = toInt32(args[1], ok);
@@ -427,8 +419,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::getUniformCallback(const v8::Argu
     }
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     WebGLProgram* program = V8WebGLProgram::HasInstance(args[0]) ? V8WebGLProgram::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
 
     bool ok = false;
@@ -477,8 +468,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::texImage2DCallback(const v8::Argu
         return notHandledByInterceptor();
     }
 
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     bool ok;
     int target = toInt32(args[0], ok);
     if (!ok) {
@@ -504,16 +494,16 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::texImage2DCallback(const v8::Argu
 
         v8::Handle<v8::Value> arg = args[2];
         if (V8HTMLImageElement::HasInstance(arg)) {
-            HTMLImageElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
+            HTMLImageElement* element = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
             context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
         } else if (V8HTMLCanvasElement::HasInstance(arg)) {
-            HTMLCanvasElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(v8::Handle<v8::Object>::Cast(arg));
+            HTMLCanvasElement* element = V8HTMLCanvasElement::toNative(v8::Handle<v8::Object>::Cast(arg));
             context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
         } else if(V8ImageData::HasInstance(arg)) {
-            ImageData* image_element = V8DOMWrapper::convertDOMWrapperToNative<ImageData>(v8::Handle<v8::Object>::Cast(arg));
-            context->texImage2D(target, level, image_element, flipY, premultiplyAlpha, ec);
+            ImageData* imageElement = V8ImageData::toNative(v8::Handle<v8::Object>::Cast(arg));
+            context->texImage2D(target, level, imageElement, flipY, premultiplyAlpha, ec);
         } else if (V8HTMLVideoElement::HasInstance(arg)) {
-            HTMLVideoElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLVideoElement>(v8::Handle<v8::Object>::Cast(arg));
+            HTMLVideoElement* element = V8HTMLVideoElement::toNative(v8::Handle<v8::Object>::Cast(arg));
             context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
         }
         else {
@@ -567,7 +557,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::texImage2DCallback(const v8::Argu
                                 0,
                                 ec);
      else if (V8WebGLArray::HasInstance(arg)) {
-            WebGLArray* array = V8DOMWrapper::convertToNativeObject<WebGLArray>(V8ClassIndex::WEBGLARRAY, arg->ToObject());
+            WebGLArray* array = V8WebGLArray::toNative(arg->ToObject());
             context->texImage2D(target,
                                 level,
                                 internalformat,
@@ -620,8 +610,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::texSubImage2DCallback(const v8::A
         return notHandledByInterceptor();
     }
 
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     bool ok;
     int target = toInt32(args[0], ok);
     if (!ok) {
@@ -657,16 +646,16 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::texSubImage2DCallback(const v8::A
 
         v8::Handle<v8::Value> arg = args[4];
         if (V8HTMLImageElement::HasInstance(arg)) {
-            HTMLImageElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
+            HTMLImageElement* element = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
             context->texSubImage2D(target, level, xoff, yoff, element, flipY, premultiplyAlpha, ec);
         } else if (V8HTMLCanvasElement::HasInstance(arg)) {
-            HTMLCanvasElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(v8::Handle<v8::Object>::Cast(arg));
+            HTMLCanvasElement* element = V8HTMLCanvasElement::toNative(v8::Handle<v8::Object>::Cast(arg));
             context->texSubImage2D(target, level, xoff, yoff, element, flipY, premultiplyAlpha, ec);
         } else if(V8ImageData::HasInstance(arg)) {
-            ImageData* image_element = V8DOMWrapper::convertDOMWrapperToNative<ImageData>(v8::Handle<v8::Object>::Cast(arg));
-            context->texSubImage2D(target, level, xoff, yoff, image_element, flipY, premultiplyAlpha, ec);
+            ImageData* imageElement = V8ImageData::toNative(v8::Handle<v8::Object>::Cast(arg));
+            context->texSubImage2D(target, level, xoff, yoff, imageElement, flipY, premultiplyAlpha, ec);
         } else if (V8HTMLVideoElement::HasInstance(arg)) {
-            HTMLVideoElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLVideoElement>(v8::Handle<v8::Object>::Cast(arg));
+            HTMLVideoElement* element = V8HTMLVideoElement::toNative(v8::Handle<v8::Object>::Cast(arg));
             context->texSubImage2D(target, level, xoff, yoff, element, flipY, premultiplyAlpha, ec);
         }
         else {
@@ -710,7 +699,7 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::texSubImage2DCallback(const v8::A
                                    0,
                                    ec);
      else if (V8WebGLArray::HasInstance(arg)) {
-            WebGLArray* array = V8DOMWrapper::convertToNativeObject<WebGLArray>(V8ClassIndex::WEBGLARRAY, arg->ToObject());
+            WebGLArray* array = V8WebGLArray::toNative(arg->ToObject());
             context->texSubImage2D(target,
                                    level,
                                    xoff,
@@ -791,16 +780,14 @@ static v8::Handle<v8::Value> vertexAttribAndUniformHelperf(const v8::Arguments&
     else
         location = toWebGLUniformLocation(args[0], ok);
 
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
 
     if (!ok) {
         V8Proxy::setDOMException(SYNTAX_ERR);
         return notHandledByInterceptor();
     }
     if (V8WebGLFloatArray::HasInstance(args[1])) {
-        WebGLFloatArray* array = 
-            V8DOMWrapper::convertToNativeObject<WebGLFloatArray>(V8ClassIndex::WEBGLFLOATARRAY, args[1]->ToObject());
+        WebGLFloatArray* array = V8WebGLFloatArray::toNative(args[1]->ToObject());
         ASSERT(array != NULL);
         ExceptionCode ec = 0;
         switch (functionToCall) {
@@ -867,8 +854,7 @@ static v8::Handle<v8::Value> uniformHelperi(const v8::Arguments& args,
         return notHandledByInterceptor();
     }
 
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
     bool ok = false;
     WebGLUniformLocation* location = toWebGLUniformLocation(args[0], ok);
 
@@ -877,8 +863,7 @@ static v8::Handle<v8::Value> uniformHelperi(const v8::Arguments& args,
         return notHandledByInterceptor();
     }
     if (V8WebGLIntArray::HasInstance(args[1])) {
-        WebGLIntArray* array = 
-            V8DOMWrapper::convertToNativeObject<WebGLIntArray>(V8ClassIndex::WEBGLINTARRAY, args[1]->ToObject());
+        WebGLIntArray* array = V8WebGLIntArray::toNative(args[1]->ToObject());
         ASSERT(array != NULL);
         ExceptionCode ec = 0;
         switch (functionToCall) {
@@ -985,8 +970,7 @@ static v8::Handle<v8::Value> uniformMatrixHelper(const v8::Arguments& args,
         return notHandledByInterceptor();
     }
 
-    WebGLRenderingContext* context =
-        V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+    WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
 
     bool ok = false;
     WebGLUniformLocation* location = toWebGLUniformLocation(args[0], ok);
@@ -997,8 +981,7 @@ static v8::Handle<v8::Value> uniformMatrixHelper(const v8::Arguments& args,
     }
     bool transpose = args[1]->BooleanValue();
     if (V8WebGLFloatArray::HasInstance(args[2])) {
-        WebGLFloatArray* array = 
-            V8DOMWrapper::convertToNativeObject<WebGLFloatArray>(V8ClassIndex::WEBGLFLOATARRAY, args[2]->ToObject());
+        WebGLFloatArray* array = V8WebGLFloatArray::toNative(args[2]->ToObject());
         ASSERT(array != NULL);
         ExceptionCode ec = 0;
         switch (matrixSize) {
diff --git a/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp b/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
index 1d9e991..dd7cb8d 100644
--- a/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
@@ -48,7 +48,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8WebSocket::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.WebSocket.addEventListener()");
-    WebSocket* webSocket = V8DOMWrapper::convertToNativeObject<WebSocket>(V8ClassIndex::WEBSOCKET, args.Holder());
+    WebSocket* webSocket = V8WebSocket::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(webSocket, args[1], false, ListenerFindOrCreate);
     if (listener) {
@@ -64,7 +64,7 @@ v8::Handle<v8::Value> V8WebSocket::addEventListenerCallback(const v8::Arguments&
 v8::Handle<v8::Value> V8WebSocket::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.WebSocket.removeEventListener()");
-    WebSocket* webSocket = V8DOMWrapper::convertToNativeObject<WebSocket>(V8ClassIndex::WEBSOCKET, args.Holder());
+    WebSocket* webSocket = V8WebSocket::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(webSocket, args[1], false, ListenerFindOnly);
     if (listener) {
@@ -127,7 +127,7 @@ v8::Handle<v8::Value> V8Custom::v8WebSocketConstructorCallback(const v8::Argumen
 v8::Handle<v8::Value> V8WebSocket::sendCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.WebSocket.send()");
-    WebSocket* webSocket = V8DOMWrapper::convertToNativeObject<WebSocket>(V8ClassIndex::WEBSOCKET, args.Holder());
+    WebSocket* webSocket = V8WebSocket::toNative(args.Holder());
 
     ExceptionCode ec = 0;
     bool ret = false;
diff --git a/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp b/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
index 09affb4..9d54f8e 100644
--- a/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
@@ -64,7 +64,7 @@ bool V8WorkerContext::WebSocketEnabled()
 
 v8::Handle<v8::Value> SetTimeoutOrInterval(const v8::Arguments& args, bool singleShot)
 {
-    WorkerContext* workerContext = V8DOMWrapper::convertDOMWrapperToNative<WorkerContext>(args.Holder());
+    WorkerContext* workerContext = V8WorkerContext::toNative(args.Holder());
 
     int argumentCount = args.Length();
     if (argumentCount < 1)
@@ -119,7 +119,7 @@ v8::Handle<v8::Value> V8WorkerContext::importScriptsCallback(const v8::Arguments
         urls.append(toWebCoreString(scriptUrl));
     }
 
-    WorkerContext* workerContext = V8DOMWrapper::convertDOMWrapperToNative<WorkerContext>(args.Holder());
+    WorkerContext* workerContext = V8WorkerContext::toNative(args.Holder());
 
     ExceptionCode ec = 0;
     workerContext->importScripts(urls, callerURL, callerLine, ec);
@@ -145,7 +145,7 @@ v8::Handle<v8::Value> V8WorkerContext::setIntervalCallback(const v8::Arguments&
 v8::Handle<v8::Value> V8WorkerContext::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS(L"DOM.WorkerContext.addEventListener()");
-    WorkerContext* workerContext = V8DOMWrapper::convertDOMWrapperToNative<WorkerContext>(args.Holder());
+    WorkerContext* workerContext = V8WorkerContext::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(workerContext, args[1], false, ListenerFindOrCreate);
     if (listener) {
@@ -161,7 +161,7 @@ v8::Handle<v8::Value> V8WorkerContext::addEventListenerCallback(const v8::Argume
 v8::Handle<v8::Value> V8WorkerContext::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS(L"DOM.WorkerContext.removeEventListener()");
-    WorkerContext* workerContext = V8DOMWrapper::convertDOMWrapperToNative<WorkerContext>(args.Holder());
+    WorkerContext* workerContext = V8WorkerContext::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(workerContext, args[1], false, ListenerFindOnly);
     if (listener) {
diff --git a/WebCore/bindings/v8/custom/V8WorkerCustom.cpp b/WebCore/bindings/v8/custom/V8WorkerCustom.cpp
index 1cbe0a5..6dec7af 100644
--- a/WebCore/bindings/v8/custom/V8WorkerCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WorkerCustom.cpp
@@ -91,7 +91,7 @@ v8::Handle<v8::Value> V8Custom::v8WorkerConstructorCallback(const v8::Arguments&
 v8::Handle<v8::Value> V8Worker::postMessageCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Worker.postMessage");
-    Worker* worker = V8DOMWrapper::convertToNativeObject<Worker>(V8ClassIndex::WORKER, args.Holder());
+    Worker* worker = V8Worker::toNative(args.Holder());
     RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(toWebCoreString(args[0]));
     MessagePortArray portArray;
     if (args.Length() > 1) {
diff --git a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index 9cc44cd..3fe414f 100644
--- a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -48,14 +48,14 @@ namespace WebCore {
 v8::Handle<v8::Value> V8XMLHttpRequest::responseTextAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.XMLHttpRequest.responsetext._get");
-    XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, info.Holder());
+    XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder());
     return xmlHttpRequest->responseText().v8StringOrNull();
 }
 
 v8::Handle<v8::Value> V8XMLHttpRequest::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.XMLHttpRequest.addEventListener()");
-    XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+    XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(xmlHttpRequest, args[1], false, ListenerFindOrCreate);
     if (listener) {
@@ -71,7 +71,7 @@ v8::Handle<v8::Value> V8XMLHttpRequest::addEventListenerCallback(const v8::Argum
 v8::Handle<v8::Value> V8XMLHttpRequest::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.XMLHttpRequest.removeEventListener()");
-    XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+    XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
 
     RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(xmlHttpRequest, args[1], false, ListenerFindOnly);
     if (listener) {
@@ -97,7 +97,7 @@ v8::Handle<v8::Value> V8XMLHttpRequest::openCallback(const v8::Arguments& args)
     if (args.Length() < 2)
         return throwError("Not enough arguments", V8Proxy::SyntaxError);
 
-    XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+    XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
 
     String method = toWebCoreString(args[0]);
     String urlstring = toWebCoreString(args[1]);
@@ -137,7 +137,7 @@ static bool IsDocumentType(v8::Handle<v8::Value> value)
 v8::Handle<v8::Value> V8XMLHttpRequest::sendCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.XMLHttpRequest.send()");
-    XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+    XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
 
     ExceptionCode ec = 0;
     if (args.Length() < 1)
@@ -146,12 +146,12 @@ v8::Handle<v8::Value> V8XMLHttpRequest::sendCallback(const v8::Arguments& args)
         v8::Handle<v8::Value> arg = args[0];
         if (IsDocumentType(arg)) {
             v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
-            Document* document = V8DOMWrapper::convertDOMWrapperToNode<Document>(object);
+            Document* document = V8Document::toNative(object);
             ASSERT(document);
             xmlHttpRequest->send(document, ec);
         } else if (V8File::HasInstance(arg)) {
             v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
-            File* file = V8DOMWrapper::convertDOMWrapperToNative<File>(object);
+            File* file = V8File::toNative(object);
             ASSERT(file);
             xmlHttpRequest->send(file, ec);
         } else
@@ -170,7 +170,7 @@ v8::Handle<v8::Value> V8XMLHttpRequest::setRequestHeaderCallback(const v8::Argum
     if (args.Length() < 2)
         return throwError("Not enough arguments", V8Proxy::SyntaxError);
 
-    XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+    XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
     ExceptionCode ec = 0;
     String header = toWebCoreString(args[0]);
     String value = toWebCoreString(args[1]);
@@ -186,7 +186,7 @@ v8::Handle<v8::Value> V8XMLHttpRequest::getResponseHeaderCallback(const v8::Argu
     if (args.Length() < 1)
         return throwError("Not enough arguments", V8Proxy::SyntaxError);
 
-    XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+    XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
     ExceptionCode ec = 0;
     String header = toWebCoreString(args[0]);
     String result = xmlHttpRequest->getResponseHeader(header, ec);
@@ -201,7 +201,7 @@ v8::Handle<v8::Value> V8XMLHttpRequest::overrideMimeTypeCallback(const v8::Argum
     if (args.Length() < 1)
         return throwError("Not enough arguments", V8Proxy::SyntaxError);
 
-    XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+    XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
     String value = toWebCoreString(args[0]);
     xmlHttpRequest->overrideMimeType(value);
     return v8::Undefined();
diff --git a/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp b/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
index 08a4426..0690189 100644
--- a/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
@@ -46,7 +46,7 @@ namespace WebCore {
 v8::Handle<v8::Value> V8XMLHttpRequestUpload::addEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.XMLHttpRequestUpload.addEventListener()");
-    XMLHttpRequestUpload* xmlHttpRequestUpload = V8DOMWrapper::convertToNativeObject<XMLHttpRequestUpload>(V8ClassIndex::XMLHTTPREQUESTUPLOAD, args.Holder());
+    XMLHttpRequestUpload* xmlHttpRequestUpload = V8XMLHttpRequestUpload::toNative(args.Holder());
 
     XMLHttpRequest* xmlHttpRequest = xmlHttpRequestUpload->associatedXMLHttpRequest();
 
@@ -64,7 +64,7 @@ v8::Handle<v8::Value> V8XMLHttpRequestUpload::addEventListenerCallback(const v8:
 v8::Handle<v8::Value> V8XMLHttpRequestUpload::removeEventListenerCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.XMLHttpRequestUpload.removeEventListener()");
-    XMLHttpRequestUpload* xmlHttpRequestUpload = V8DOMWrapper::convertToNativeObject<XMLHttpRequestUpload>(V8ClassIndex::XMLHTTPREQUESTUPLOAD, args.Holder());
+    XMLHttpRequestUpload* xmlHttpRequestUpload = V8XMLHttpRequestUpload::toNative(args.Holder());
 
     XMLHttpRequest* xmlHttpRequest = xmlHttpRequestUpload->associatedXMLHttpRequest();
 
diff --git a/WebCore/bindings/v8/custom/V8XSLTProcessorCustom.cpp b/WebCore/bindings/v8/custom/V8XSLTProcessorCustom.cpp
index 47b802e..73667e5 100644
--- a/WebCore/bindings/v8/custom/V8XSLTProcessorCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8XSLTProcessorCustom.cpp
@@ -59,9 +59,9 @@ v8::Handle<v8::Value> V8XSLTProcessor::importStylesheetCallback(const v8::Argume
     if (!V8Node::HasInstance(args[0]))
         return v8::Undefined();
 
-    XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+    XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
 
-    Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
+    Node* node = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
     imp->importStylesheet(node);
     return v8::Undefined();
 }
@@ -73,10 +73,10 @@ v8::Handle<v8::Value> V8XSLTProcessor::transformToFragmentCallback(const v8::Arg
     if (!V8Node::HasInstance(args[0]) || !V8Document::HasInstance(args[1]))
         return v8::Undefined();
 
-    XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+    XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
 
-    Node* source = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
-    Document* owner = V8DOMWrapper::convertDOMWrapperToNode<Document>(v8::Handle<v8::Object>::Cast(args[1]));
+    Node* source = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
+    Document* owner = V8Document::toNative(v8::Handle<v8::Object>::Cast(args[1]));
     RefPtr<DocumentFragment> result = imp->transformToFragment(source, owner);
     return V8DOMWrapper::convertNodeToV8Object(result.release());
 }
@@ -89,9 +89,9 @@ v8::Handle<v8::Value> V8XSLTProcessor::transformToDocumentCallback(const v8::Arg
     if (!V8Node::HasInstance(args[0]))
         return v8::Undefined();
 
-    XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+    XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
 
-    Node* source = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
+    Node* source = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
     if (!source)
         return v8::Undefined();
 
@@ -109,7 +109,7 @@ v8::Handle<v8::Value> V8XSLTProcessor::setParameterCallback(const v8::Arguments&
     if (isUndefinedOrNull(args[1]) || isUndefinedOrNull(args[2]))
         return v8::Undefined();
 
-    XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+    XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
 
     String namespaceURI = toWebCoreString(args[0]);
     String localName = toWebCoreString(args[1]);
@@ -126,7 +126,7 @@ v8::Handle<v8::Value> V8XSLTProcessor::getParameterCallback(const v8::Arguments&
     if (isUndefinedOrNull(args[1]))
         return v8::Undefined();
 
-    XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+    XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
 
     String namespaceURI = toWebCoreString(args[0]);
     String localName = toWebCoreString(args[1]);
@@ -143,7 +143,7 @@ v8::Handle<v8::Value> V8XSLTProcessor::removeParameterCallback(const v8::Argumen
     if (isUndefinedOrNull(args[1]))
         return v8::Undefined();
 
-    XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+    XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
 
     String namespaceURI = toWebCoreString(args[0]);
     String localName = toWebCoreString(args[1]);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list