2011-04-17 Geoffrey Garen <ggaren@apple.com>
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 17 Apr 2011 19:03:13 +0000 (19:03 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 17 Apr 2011 19:03:13 +0000 (19:03 +0000)
        Strongly suggested, but not necessarily reviewed, by
        Sam Weinig and Maciej Stachowiak.

        Renamed DOMObject* => JSDOMWrapper*.

        * bindings/js/DOMWrapperWorld.cpp:
        (WebCore::isObservable):
        (WebCore::DOMObjectHandleOwner::finalize):
        * bindings/js/DOMWrapperWorld.h:
        * bindings/js/JSArrayBufferViewHelper.h:
        (WebCore::toJSArrayBufferView):
        * bindings/js/JSCSSRuleCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSCSSValueCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSDOMBinding.h:
        (WebCore::JSDOMWrapperWithGlobalPointer::globalObject):
        (WebCore::JSDOMWrapperWithGlobalPointer::JSDOMWrapperWithGlobalPointer):
        (WebCore::DOMConstructorObject::DOMConstructorObject):
        (WebCore::createDOMObjectWrapper):
        (WebCore::getDOMObjectWrapper):
        * bindings/js/JSDOMWrapper.cpp:
        (WebCore::JSDOMWrapper::~JSDOMWrapper):
        * bindings/js/JSDOMWrapper.h:
        (WebCore::JSDOMWrapper::JSDOMWrapper):
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::JSDocument::location):
        (WebCore::toJS):
        * bindings/js/JSEventCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSHTMLCollectionCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSImageDataCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSSVGPathSegCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSStyleSheetCustom.cpp:
        (WebCore::toJS):
        * bindings/js/ScriptWrappable.h:
        (WebCore::ScriptWrappable::wrapper):
        (WebCore::ScriptWrappable::setWrapper):
        * bindings/scripts/CodeGeneratorJS.pm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84105 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/DOMWrapperWorld.cpp
Source/WebCore/bindings/js/DOMWrapperWorld.h
Source/WebCore/bindings/js/JSArrayBufferViewHelper.h
Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
Source/WebCore/bindings/js/JSCSSValueCustom.cpp
Source/WebCore/bindings/js/JSDOMBinding.cpp
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSDOMWrapper.cpp
Source/WebCore/bindings/js/JSDOMWrapper.h
Source/WebCore/bindings/js/JSDocumentCustom.cpp
Source/WebCore/bindings/js/JSEventCustom.cpp
Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
Source/WebCore/bindings/js/JSImageDataCustom.cpp
Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp
Source/WebCore/bindings/js/JSStyleSheetCustom.cpp
Source/WebCore/bindings/js/ScriptWrappable.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

index fd7fc15..3bdcaa1 100644 (file)
@@ -1,3 +1,48 @@
+2011-04-17  Geoffrey Garen  <ggaren@apple.com>
+
+        Strongly suggested, but not necessarily reviewed, by
+        Sam Weinig and Maciej Stachowiak.
+
+        Renamed DOMObject* => JSDOMWrapper*.
+
+        * bindings/js/DOMWrapperWorld.cpp:
+        (WebCore::isObservable):
+        (WebCore::DOMObjectHandleOwner::finalize):
+        * bindings/js/DOMWrapperWorld.h:
+        * bindings/js/JSArrayBufferViewHelper.h:
+        (WebCore::toJSArrayBufferView):
+        * bindings/js/JSCSSRuleCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSCSSValueCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSDOMBinding.h:
+        (WebCore::JSDOMWrapperWithGlobalPointer::globalObject):
+        (WebCore::JSDOMWrapperWithGlobalPointer::JSDOMWrapperWithGlobalPointer):
+        (WebCore::DOMConstructorObject::DOMConstructorObject):
+        (WebCore::createDOMObjectWrapper):
+        (WebCore::getDOMObjectWrapper):
+        * bindings/js/JSDOMWrapper.cpp:
+        (WebCore::JSDOMWrapper::~JSDOMWrapper):
+        * bindings/js/JSDOMWrapper.h:
+        (WebCore::JSDOMWrapper::JSDOMWrapper):
+        * bindings/js/JSDocumentCustom.cpp:
+        (WebCore::JSDocument::location):
+        (WebCore::toJS):
+        * bindings/js/JSEventCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSHTMLCollectionCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSImageDataCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSSVGPathSegCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSStyleSheetCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/ScriptWrappable.h:
+        (WebCore::ScriptWrappable::wrapper):
+        (WebCore::ScriptWrappable::setWrapper):
+        * bindings/scripts/CodeGeneratorJS.pm:
+
 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
 
         Reviewed by Adam Barth.
index 54ddf54..7f966e7 100644 (file)
@@ -77,7 +77,7 @@ static bool isObservable(JSNode* jsNode, Node* node, DOMWrapperWorld* world)
     // keep the node wrappers protecting them alive.
     if (node->isElementNode()) {
         if (NamedNodeMap* attributes = static_cast<Element*>(node)->attributeMap()) {
-            if (DOMObject* wrapper = world->m_wrappers.get(attributes).get()) {
+            if (JSDOMWrapper* wrapper = world->m_wrappers.get(attributes).get()) {
                 // FIXME: This check seems insufficient, because NamedNodeMap items can have custom properties themselves.
                 // Maybe it would be OK to just keep the wrapper alive, as it is done for CSSOM objects below.
                 if (wrapper->hasCustomProperties())
@@ -92,7 +92,7 @@ static bool isObservable(JSNode* jsNode, Node* node, DOMWrapperWorld* world)
         }
         if (static_cast<Element*>(node)->hasTagName(canvasTag)) {
             if (CanvasRenderingContext* context = static_cast<HTMLCanvasElement*>(node)->renderingContext()) {
-                if (DOMObject* wrapper = world->m_wrappers.get(context).get()) {
+                if (JSDOMWrapper* wrapper = world->m_wrappers.get(context).get()) {
                     if (wrapper->hasCustomProperties())
                         return true;
                 }
@@ -201,7 +201,7 @@ bool DOMObjectHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>,
 
 void DOMObjectHandleOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    DOMObject* domObject = static_cast<DOMObject*>(handle.get().asCell());
+    JSDOMWrapper* domObject = static_cast<JSDOMWrapper*>(handle.get().asCell());
     uncacheDOMObjectWrapper(m_world, context, domObject);
 }
 
index ea87cc5..15a37de 100644 (file)
 
 namespace WebCore {
 
-class DOMObject;
+class JSDOMWrapper;
 class ScriptController;
 
-typedef HashMap<void*, JSC::Weak<DOMObject> > DOMObjectWrapperMap;
+typedef HashMap<void*, JSC::Weak<JSDOMWrapper> > DOMObjectWrapperMap;
 typedef JSC::WeakGCMap<StringImpl*, JSC::JSString> JSStringCache;
 
 class JSNodeHandleOwner : public JSC::WeakHandleOwner {
index b20596b..3386a4d 100644 (file)
@@ -163,7 +163,7 @@ static JSC::JSValue toJSArrayBufferView(JSC::ExecState* exec, JSDOMGlobalObject*
     if (!object)
         return JSC::jsNull();
 
-    if (DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), object))
+    if (JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), object))
         return wrapper;
 
     exec->heap()->reportExtraMemoryCost(object->byteLength());
index a6d48f0..7e2700d 100644 (file)
@@ -63,7 +63,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, CSSRule* rule)
     if (!rule)
         return jsNull();
 
-    DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), rule);
+    JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), rule);
     if (wrapper)
         return wrapper;
 
index ea4a276..58fb7d7 100644 (file)
@@ -49,7 +49,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, CSSValue* value)
     if (!value)
         return jsNull();
 
-    DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), value);
+    JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), value);
 
     if (wrapper)
         return wrapper;
index df1821c..302ff7f 100644 (file)
@@ -135,17 +135,17 @@ const JSC::HashTable* getHashTableForGlobalData(JSGlobalData& globalData, const
     return DOMObjectHashTableMap::mapFor(globalData).get(staticTable);
 }
 
-DOMObject* getCachedDOMObjectWrapper(DOMWrapperWorld* world, void* objectHandle) 
+JSDOMWrapper* getCachedDOMObjectWrapper(DOMWrapperWorld* world, void* objectHandle) 
 {
     return world->m_wrappers.get(objectHandle).get();
 }
 
-void cacheDOMObjectWrapper(DOMWrapperWorld* world, void* objectHandle, DOMObject* wrapper) 
+void cacheDOMObjectWrapper(DOMWrapperWorld* world, void* objectHandle, JSDOMWrapper* wrapper) 
 {
-    world->m_wrappers.set(objectHandle, Weak<DOMObject>(*world->globalData(), wrapper, world->domObjectHandleOwner(), objectHandle));
+    world->m_wrappers.set(objectHandle, Weak<JSDOMWrapper>(*world->globalData(), wrapper, world->domObjectHandleOwner(), objectHandle));
 }
 
-void uncacheDOMObjectWrapper(DOMWrapperWorld* world, void* objectHandle, DOMObject* wrapper)
+void uncacheDOMObjectWrapper(DOMWrapperWorld* world, void* objectHandle, JSDOMWrapper* wrapper)
 {
     ASSERT_UNUSED(wrapper, world->m_wrappers.find(objectHandle)->second.get() == wrapper);
     world->m_wrappers.remove(objectHandle);
@@ -184,7 +184,7 @@ void markDOMObjectWrapper(MarkStack& markStack, JSGlobalData& globalData, void*
         return;
 
     for (JSGlobalDataWorldIterator worldIter(&globalData); worldIter; ++worldIter) {
-        if (DOMObject* wrapper = worldIter->m_wrappers.get(object).get())
+        if (JSDOMWrapper* wrapper = worldIter->m_wrappers.get(object).get())
             markStack.deprecatedAppend(reinterpret_cast<JSCell**>(&wrapper));
     }
 }
index d3fa7be..9ca3ae4 100644 (file)
@@ -48,13 +48,13 @@ namespace WebCore {
 
     typedef int ExceptionCode;
 
-    // FIXME: This class should collapse into DOMObject once all DOMObjects are
+    // FIXME: This class should collapse into JSDOMWrapper once all JSDOMWrappers are
     // updated to store a globalObject pointer.
-    class DOMObjectWithGlobalPointer : public DOMObject {
+    class JSDOMWrapperWithGlobalPointer : public JSDOMWrapper {
     public:
         JSDOMGlobalObject* globalObject() const
         {
-            return static_cast<JSDOMGlobalObject*>(DOMObject::globalObject());
+            return static_cast<JSDOMGlobalObject*>(JSDOMWrapper::globalObject());
         }
 
         ScriptExecutionContext* scriptExecutionContext() const
@@ -69,8 +69,8 @@ namespace WebCore {
         }
 
     protected:
-        DOMObjectWithGlobalPointer(JSC::Structure* structure, JSDOMGlobalObject* globalObject)
-            : DOMObject(globalObject, structure)
+        JSDOMWrapperWithGlobalPointer(JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+            : JSDOMWrapper(globalObject, structure)
         {
             // FIXME: This ASSERT is valid, but fires in fast/dom/gc-6.html when trying to create
             // new JavaScript objects on detached windows due to DOMWindow::document()
@@ -80,7 +80,7 @@ namespace WebCore {
     };
 
     // Base class for all constructor objects in the JSC bindings.
-    class DOMConstructorObject : public DOMObjectWithGlobalPointer {
+    class DOMConstructorObject : public JSDOMWrapperWithGlobalPointer {
     public:
         static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
         {
@@ -88,9 +88,9 @@ namespace WebCore {
         }
 
     protected:
-        static const unsigned StructureFlags = JSC::ImplementsHasInstance | JSC::OverridesMarkChildren | DOMObjectWithGlobalPointer::StructureFlags;
+        static const unsigned StructureFlags = JSC::ImplementsHasInstance | JSC::OverridesMarkChildren | JSDOMWrapperWithGlobalPointer::StructureFlags;
         DOMConstructorObject(JSC::Structure* structure, JSDOMGlobalObject* globalObject)
-            : DOMObjectWithGlobalPointer(structure, globalObject)
+            : JSDOMWrapperWithGlobalPointer(structure, globalObject)
         {
         }
     };
@@ -112,9 +112,9 @@ namespace WebCore {
         }
     };
 
-    DOMObject* getCachedDOMObjectWrapper(DOMWrapperWorld*, void* objectHandle);
-    void cacheDOMObjectWrapper(DOMWrapperWorld*, void* objectHandle, DOMObject* wrapper);
-    void uncacheDOMObjectWrapper(DOMWrapperWorld*, void* objectHandle, DOMObject* wrapper);
+    JSDOMWrapper* getCachedDOMObjectWrapper(DOMWrapperWorld*, void* objectHandle);
+    void cacheDOMObjectWrapper(DOMWrapperWorld*, void* objectHandle, JSDOMWrapper* wrapper);
+    void uncacheDOMObjectWrapper(DOMWrapperWorld*, void* objectHandle, JSDOMWrapper* wrapper);
 
     JSNode* getCachedDOMNodeWrapper(DOMWrapperWorld*, Node*);
     void cacheDOMNodeWrapper(DOMWrapperWorld*, Node*, JSNode* wrapper);
@@ -150,7 +150,7 @@ namespace WebCore {
         return static_cast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(exec, static_cast<JSDOMGlobalObject*>(globalObject))->storedPrototype()));
     }
     #define CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, className, object) createDOMObjectWrapper<JS##className>(exec, globalObject, static_cast<className*>(object))
-    template<class WrapperClass, class DOMClass> inline DOMObject* createDOMObjectWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* object)
+    template<class WrapperClass, class DOMClass> inline JSDOMWrapper* createDOMObjectWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* object)
     {
         ASSERT(object);
         ASSERT(!getCachedDOMObjectWrapper(currentWorld(exec), object));
@@ -163,7 +163,7 @@ namespace WebCore {
     {
         if (!object)
             return JSC::jsNull();
-        if (DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), object))
+        if (JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), object))
             return wrapper;
         return createDOMObjectWrapper<WrapperClass>(exec, globalObject, object);
     }
index ff7ccd9..3102dcc 100644 (file)
@@ -441,7 +441,7 @@ JSValue JSDOMWindow::lookupSetter(ExecState* exec, const Identifier& propertyNam
 JSValue JSDOMWindow::history(ExecState* exec) const
 {
     History* history = impl()->history();
-    if (DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), history))
+    if (JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), history))
         return wrapper;
 
     JSDOMWindow* window = const_cast<JSDOMWindow*>(this);
@@ -453,7 +453,7 @@ JSValue JSDOMWindow::history(ExecState* exec) const
 JSValue JSDOMWindow::location(ExecState* exec) const
 {
     Location* location = impl()->location();
-    if (DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), location))
+    if (JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), location))
         return wrapper;
 
     JSDOMWindow* window = const_cast<JSDOMWindow*>(this);
index c91230b..60c0ed1 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
 
 #ifndef NDEBUG
 
-DOMObject::~DOMObject()
+JSDOMWrapper::~JSDOMWrapper()
 {
 }
 
index 8df5801..1484dc6 100644 (file)
 
 namespace WebCore {
 
-// FIXME: Rename to JSDOMWrapper.
-class DOMObject : public JSC::JSObjectWithGlobalObject {
+class JSDOMWrapper : public JSC::JSObjectWithGlobalObject {
 protected:
-    explicit DOMObject(JSC::JSGlobalObject* globalObject, JSC::Structure* structure) 
+    explicit JSDOMWrapper(JSC::JSGlobalObject* globalObject, JSC::Structure* structure) 
         : JSObjectWithGlobalObject(globalObject, structure)
     {
     }
 
 #ifndef NDEBUG
-    virtual ~DOMObject();
+    virtual ~JSDOMWrapper();
 #endif
 };
 
index 33e9802..cf0adf1 100644 (file)
@@ -68,7 +68,7 @@ JSValue JSDocument::location(ExecState* exec) const
         return jsNull();
 
     Location* location = frame->domWindow()->location();
-    if (DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), location))
+    if (JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), location))
         return wrapper;
 
     JSLocation* jsLocation = new (exec) JSLocation(getDOMStructure<JSLocation>(exec, globalObject()), globalObject(), location);
@@ -100,7 +100,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Document* documen
     if (!document)
         return jsNull();
 
-    DOMObject* wrapper = getCachedDOMNodeWrapper(currentWorld(exec), document);
+    JSDOMWrapper* wrapper = getCachedDOMNodeWrapper(currentWorld(exec), document);
     if (wrapper)
         return wrapper;
 
index 64bbe74..ace798b 100644 (file)
@@ -121,7 +121,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Event* event)
     if (!event)
         return jsNull();
 
-    DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), event);
+    JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), event);
     if (wrapper)
         return wrapper;
 
index 65b4a42..a80586d 100644 (file)
@@ -134,7 +134,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, HTMLCollection* c
     if (!collection)
         return jsNull();
 
-    DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), collection);
+    JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), collection);
 
     if (wrapper)
         return wrapper;
index 32e8d45..87df41d 100644 (file)
@@ -41,7 +41,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, ImageData* imageD
     if (!imageData)
         return jsNull();
     
-    DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), imageData);
+    JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), imageData);
     if (wrapper)
         return wrapper;
     
index cb9040c..97d301b 100644 (file)
@@ -63,7 +63,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, SVGPathSeg* objec
     if (!object)
         return jsNull();
 
-    if (DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), object))
+    if (JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), object))
         return wrapper;
 
     switch (object->pathSegType()) {
index 298b69d..39a9fe4 100644 (file)
@@ -40,7 +40,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, StyleSheet* style
     if (!styleSheet)
         return jsNull();
 
-    DOMObject* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), styleSheet);
+    JSDOMWrapper* wrapper = getCachedDOMObjectWrapper(currentWorld(exec), styleSheet);
     if (wrapper)
         return wrapper;
 
index 9ff57ca..4fef506 100644 (file)
@@ -38,12 +38,12 @@ namespace WebCore {
 
 class ScriptWrappable {
 public:
-    DOMObject* wrapper() const
+    JSDOMWrapper* wrapper() const
     {
         return m_wrapper.get();
     }
 
-    void setWrapper(JSC::JSGlobalData& globalData, DOMObject* wrapper, JSC::WeakHandleOwner* wrapperOwner, void* context)
+    void setWrapper(JSC::JSGlobalData& globalData, JSDOMWrapper* wrapper, JSC::WeakHandleOwner* wrapperOwner, void* context)
     {
         m_wrapper.set(globalData, wrapper, wrapperOwner, context);
     }
@@ -54,7 +54,7 @@ public:
     }
 
 private:
-    JSC::Weak<DOMObject> m_wrapper;
+    JSC::Weak<JSDOMWrapper> m_wrapper;
 };
 
 } // namespace WebCore
index 9389f50..5a5ddcd 100644 (file)
@@ -200,7 +200,7 @@ sub GetParentClassName
     my $dataNode = shift;
 
     return $dataNode->extendedAttributes->{"LegacyParent"} if $dataNode->extendedAttributes->{"LegacyParent"};
-    return "DOMObjectWithGlobalPointer" if (@{$dataNode->parents} eq 0);
+    return "JSDOMWrapperWithGlobalPointer" if (@{$dataNode->parents} eq 0);
     return "JS" . $codeGenerator->StripModule($dataNode->parents(0));
 }
 
@@ -1540,7 +1540,7 @@ sub GenerateImplementation
                     my $constructorType = $codeGenerator->StripModule($attribute->signature->type);
                     $constructorType =~ s/Constructor$//;
                     # Constructor attribute is only used by DOMWindow.idl, so it's correct to pass castedThis as the global object
-                    # Once DOMObjects have a back-pointer to the globalObject we can pass castedThis->globalObject()
+                    # Once JSDOMWrappers have a back-pointer to the globalObject we can pass castedThis->globalObject()
                     push(@implContent, "    return JS" . $constructorType . "::getConstructor(exec, castedThis);\n");
                 } elsif (!@{$attribute->getterExceptions}) {
                     push(@implContent, "    UNUSED_PARAM(exec);\n");
@@ -2924,12 +2924,12 @@ sub GenerateConstructorDefinition
 
     push(@$outputArray, "bool ${constructorClassName}::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)\n");
     push(@$outputArray, "{\n");
-    push(@$outputArray, "    return getStaticValueSlot<${constructorClassName}, DOMObject>(exec, &${constructorClassName}Table, this, propertyName, slot);\n");
+    push(@$outputArray, "    return getStaticValueSlot<${constructorClassName}, JSDOMWrapper>(exec, &${constructorClassName}Table, this, propertyName, slot);\n");
     push(@$outputArray, "}\n\n");
 
     push(@$outputArray, "bool ${constructorClassName}::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)\n");
     push(@$outputArray, "{\n");
-    push(@$outputArray, "    return getStaticValueDescriptor<${constructorClassName}, DOMObject>(exec, &${constructorClassName}Table, this, propertyName, descriptor);\n");
+    push(@$outputArray, "    return getStaticValueDescriptor<${constructorClassName}, JSDOMWrapper>(exec, &${constructorClassName}Table, this, propertyName, descriptor);\n");
     push(@$outputArray, "}\n\n");
 
     if ($canConstruct) {