Add ParentClass typedef in all JSC classes
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Aug 2011 20:46:17 +0000 (20:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Aug 2011 20:46:17 +0000 (20:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=65731

Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-08-09
Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Just added the Base typedefs in all the classes that are a subclass of JSCell
to point at their parent classes.  This is a change to support future changes to the way
constructors and destructors are implemented in JS objects, among other things.

* API/JSCallbackConstructor.h:
* API/JSCallbackFunction.h:
* API/JSCallbackObject.h:
(JSC::JSCallbackObject::createStructure):
(JSC::JSCallbackObject::visitChildren):
* API/JSCallbackObjectFunctions.h:
(JSC::::asCallbackObject):
(JSC::::JSCallbackObject):
(JSC::::init):
(JSC::::className):
(JSC::::getOwnPropertySlot):
(JSC::::getOwnPropertyDescriptor):
(JSC::::put):
(JSC::::deleteProperty):
(JSC::::getConstructData):
(JSC::::construct):
(JSC::::hasInstance):
(JSC::::getCallData):
(JSC::::call):
(JSC::::getOwnPropertyNames):
(JSC::::toNumber):
(JSC::::toString):
(JSC::::setPrivate):
(JSC::::getPrivate):
(JSC::::inherits):
(JSC::::getStaticValue):
(JSC::::staticFunctionGetter):
(JSC::::callbackGetter):
* debugger/DebuggerActivation.h:
* jsc.cpp:
* runtime/Arguments.h:
* runtime/ArrayConstructor.h:
* runtime/ArrayPrototype.h:
* runtime/BooleanConstructor.h:
* runtime/BooleanObject.h:
* runtime/BooleanPrototype.h:
* runtime/DateConstructor.h:
* runtime/DateInstance.h:
* runtime/DatePrototype.h:
* runtime/Error.cpp:
* runtime/ErrorConstructor.h:
* runtime/ErrorInstance.h:
* runtime/ErrorPrototype.h:
* runtime/ExceptionHelpers.cpp:
* runtime/Executable.h:
* runtime/FunctionConstructor.h:
* runtime/FunctionPrototype.h:
* runtime/GetterSetter.h:
* runtime/InternalFunction.h:
* runtime/JSAPIValueWrapper.h:
* runtime/JSActivation.h:
* runtime/JSArray.h:
* runtime/JSFunction.h:
* runtime/JSGlobalObject.h:
* runtime/JSNotAnObject.h:
* runtime/JSONObject.h:
* runtime/JSObject.h:
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.h:
* runtime/JSString.h:
* runtime/JSVariableObject.h:
* runtime/JSWrapperObject.h:
* runtime/MathObject.h:
* runtime/NativeErrorConstructor.h:
* runtime/NativeErrorPrototype.h:
* runtime/NumberConstructor.h:
* runtime/NumberObject.h:
* runtime/NumberPrototype.h:
* runtime/ObjectConstructor.h:
* runtime/ObjectPrototype.h:
* runtime/RegExp.h:
* runtime/RegExpConstructor.h:
* runtime/RegExpMatchesArray.h:
* runtime/RegExpObject.h:
(JSC::RegExpObject::create):
* runtime/RegExpPrototype.h:
* runtime/ScopeChain.h:
* runtime/StrictEvalActivation.h:
* runtime/StringConstructor.h:
* runtime/StringObject.h:
* runtime/StringObjectThatMasqueradesAsUndefined.h:
* runtime/StringPrototype.h:
* runtime/Structure.h:
* runtime/StructureChain.h:

Source/JavaScriptGlue:

Just added the Base typedefs in all the classes that are a subclass of JSCell
to point at their parent classes.  This is a change to support future changes to the way
constructors and destructors are implemented in JS objects, among other things.

* JSRun.h:
* UserObjectImp.h:

Source/WebCore:

No new tests.

Just added the Base typedefs in all the classes that are a subclass of JSCell
to point at their parent classes.  This is a change to support future changes to the way
constructors and destructors are implemented in JS objects, among other things.

* bindings/js/JSAudioConstructor.h:
* bindings/js/JSImageConstructor.h:
* bindings/js/JSOptionConstructor.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateConstructorDeclaration):
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bridge/c/CRuntimeObject.h:
* bridge/c/c_instance.cpp:
* bridge/jni/jsc/JavaInstanceJSC.cpp:
* bridge/jni/jsc/JavaRuntimeObject.h:
* bridge/objc/ObjCRuntimeObject.h:
* bridge/objc/objc_runtime.h:
* bridge/qt/qt_instance.cpp:
* bridge/qt/qt_pixmapruntime.cpp:
* bridge/qt/qt_runtime.h:
* bridge/runtime_array.h:
* bridge/runtime_method.h:
* bridge/runtime_object.h:
* bridge/testqtbindings.cpp:
(Global::className):

Source/WebKit/mac:

Just added the Base typedefs in all the classes that are a subclass of JSCell
to point at their parent classes.  This is a change to support future changes to the way
constructors and destructors are implemented in JS objects, among other things.

* Plugins/Hosted/ProxyInstance.mm:
* Plugins/Hosted/ProxyRuntimeObject.h:

Source/WebKit2:

Just added the Base typedefs in all the classes that are a subclass of JSCell
to point at their parent classes.  This is a change to support future changes to the way
constructors and destructors are implemented in JS objects, among other things.

* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.h:

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

95 files changed:
Source/JavaScriptCore/API/JSCallbackConstructor.h
Source/JavaScriptCore/API/JSCallbackFunction.h
Source/JavaScriptCore/API/JSCallbackObject.h
Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/debugger/DebuggerActivation.h
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/Arguments.h
Source/JavaScriptCore/runtime/ArrayConstructor.h
Source/JavaScriptCore/runtime/ArrayPrototype.h
Source/JavaScriptCore/runtime/BooleanConstructor.h
Source/JavaScriptCore/runtime/BooleanObject.h
Source/JavaScriptCore/runtime/BooleanPrototype.h
Source/JavaScriptCore/runtime/DateConstructor.h
Source/JavaScriptCore/runtime/DateInstance.h
Source/JavaScriptCore/runtime/DatePrototype.h
Source/JavaScriptCore/runtime/Error.cpp
Source/JavaScriptCore/runtime/ErrorConstructor.h
Source/JavaScriptCore/runtime/ErrorInstance.h
Source/JavaScriptCore/runtime/ErrorPrototype.h
Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
Source/JavaScriptCore/runtime/Executable.h
Source/JavaScriptCore/runtime/FunctionConstructor.h
Source/JavaScriptCore/runtime/FunctionPrototype.h
Source/JavaScriptCore/runtime/GetterSetter.h
Source/JavaScriptCore/runtime/InternalFunction.h
Source/JavaScriptCore/runtime/JSAPIValueWrapper.h
Source/JavaScriptCore/runtime/JSActivation.h
Source/JavaScriptCore/runtime/JSArray.h
Source/JavaScriptCore/runtime/JSFunction.h
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/JSNotAnObject.h
Source/JavaScriptCore/runtime/JSONObject.h
Source/JavaScriptCore/runtime/JSObject.h
Source/JavaScriptCore/runtime/JSPropertyNameIterator.h
Source/JavaScriptCore/runtime/JSStaticScopeObject.h
Source/JavaScriptCore/runtime/JSString.h
Source/JavaScriptCore/runtime/JSVariableObject.h
Source/JavaScriptCore/runtime/JSWrapperObject.h
Source/JavaScriptCore/runtime/MathObject.h
Source/JavaScriptCore/runtime/NativeErrorConstructor.h
Source/JavaScriptCore/runtime/NativeErrorPrototype.h
Source/JavaScriptCore/runtime/NumberConstructor.h
Source/JavaScriptCore/runtime/NumberObject.h
Source/JavaScriptCore/runtime/NumberPrototype.h
Source/JavaScriptCore/runtime/ObjectConstructor.h
Source/JavaScriptCore/runtime/ObjectPrototype.h
Source/JavaScriptCore/runtime/RegExp.h
Source/JavaScriptCore/runtime/RegExpConstructor.h
Source/JavaScriptCore/runtime/RegExpMatchesArray.h
Source/JavaScriptCore/runtime/RegExpObject.h
Source/JavaScriptCore/runtime/RegExpPrototype.h
Source/JavaScriptCore/runtime/ScopeChain.h
Source/JavaScriptCore/runtime/StrictEvalActivation.h
Source/JavaScriptCore/runtime/StringConstructor.h
Source/JavaScriptCore/runtime/StringObject.h
Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h
Source/JavaScriptCore/runtime/StringPrototype.h
Source/JavaScriptCore/runtime/Structure.h
Source/JavaScriptCore/runtime/StructureChain.h
Source/JavaScriptGlue/ChangeLog
Source/JavaScriptGlue/JSRun.h
Source/JavaScriptGlue/UserObjectImp.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSAudioConstructor.h
Source/WebCore/bindings/js/JSImageConstructor.h
Source/WebCore/bindings/js/JSOptionConstructor.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
Source/WebCore/bridge/c/CRuntimeObject.h
Source/WebCore/bridge/c/c_instance.cpp
Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
Source/WebCore/bridge/jni/jsc/JavaRuntimeObject.h
Source/WebCore/bridge/objc/ObjCRuntimeObject.h
Source/WebCore/bridge/objc/objc_runtime.h
Source/WebCore/bridge/qt/qt_instance.cpp
Source/WebCore/bridge/qt/qt_pixmapruntime.cpp
Source/WebCore/bridge/qt/qt_runtime.h
Source/WebCore/bridge/runtime_array.h
Source/WebCore/bridge/runtime_method.h
Source/WebCore/bridge/runtime_object.h
Source/WebCore/bridge/testqtbindings.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.h
Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h

index f82d2c1..40aabcf 100644 (file)
@@ -32,9 +32,9 @@
 namespace JSC {
 
 class JSCallbackConstructor : public JSObjectWithGlobalObject {
-protected:
-    JSCallbackConstructor(JSGlobalObject*, Structure*, JSClassRef, JSObjectCallAsConstructorCallback);
 public:
+    typedef JSObjectWithGlobalObject Base;
+
     static JSCallbackConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, JSObjectCallAsConstructorCallback callback) 
     {
         return new (allocateCell<JSCallbackConstructor>(*exec->heap())) JSCallbackConstructor(globalObject, structure, classRef, callback);
@@ -51,6 +51,7 @@ public:
     }
 
 protected:
+    JSCallbackConstructor(JSGlobalObject*, Structure*, JSClassRef, JSObjectCallAsConstructorCallback);
     static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags;
 
 private:
index 76418a5..1d7a0a9 100644 (file)
@@ -36,6 +36,8 @@ protected:
     JSCallbackFunction(ExecState*, JSGlobalObject*, JSObjectCallAsFunctionCallback, const Identifier& name);
 
 public:
+    typedef InternalFunction Base;
+
     static JSCallbackFunction* create(ExecState* exec, JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, const Identifier& name)
     {
         return new (allocateCell<JSCallbackFunction>(*exec->heap())) JSCallbackFunction(exec, globalObject, callback, name);
index 0f265b0..ee990a0 100644 (file)
@@ -114,17 +114,19 @@ struct JSCallbackObjectData : WeakHandleOwner {
 };
 
     
-template <class Base>
-class JSCallbackObject : public Base {
+template <class Parent>
+class JSCallbackObject : public Parent {
 protected:
     JSCallbackObject(ExecState*, JSGlobalObject*, Structure*, JSClassRef, void* data);
     JSCallbackObject(JSGlobalData&, JSClassRef, Structure*);
     // We'd like to use the placement version of operator new defined in JSCell, but 
-    // we can't because Base is a template argument, so we just duplicate the same 
+    // we can't because Parent is a template argument, so we just duplicate the same 
     // functionality here.
     void* operator new(size_t, void* ptr) { return ptr; }
 
 public:
+    typedef Parent Base;
+
     static JSCallbackObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, void* data)
     {
         return new (allocateCell<JSCallbackObject>(*exec->heap())) JSCallbackObject(exec, globalObject, structure, classRef, data);
@@ -144,7 +146,7 @@ public:
 
     static Structure* createStructure(JSGlobalData& globalData, JSValue proto) 
     { 
-        return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount, &s_info); 
+        return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), Parent::AnonymousSlotCount, &s_info); 
     }
     
     JSValue getPrivateProperty(const Identifier& propertyName) const
@@ -163,7 +165,7 @@ public:
     }
 
 protected:
-    static const unsigned StructureFlags = ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Base::StructureFlags;
+    static const unsigned StructureFlags = ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Parent::StructureFlags;
 
 private:
     virtual UString className() const;
@@ -188,10 +190,10 @@ private:
 
     virtual void visitChildren(SlotVisitor& visitor)
     {
-        ASSERT_GC_OBJECT_INHERITS((static_cast<Base*>(this)), &JSCallbackObject<Base>::s_info);
+        ASSERT_GC_OBJECT_INHERITS((static_cast<Parent*>(this)), &JSCallbackObject<Parent>::s_info);
         COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
-        ASSERT(Base::structure()->typeInfo().overridesVisitChildren());
-        Base::visitChildren(visitor);
+        ASSERT(Parent::structure()->typeInfo().overridesVisitChildren());
+        Parent::visitChildren(visitor);
         m_callbackObjectData->visitChildren(visitor);
     }
 
index c28c2ce..6910e56 100644 (file)
 
 namespace JSC {
 
-template <class Base>
-inline JSCallbackObject<Base>* JSCallbackObject<Base>::asCallbackObject(JSValue value)
+template <class Parent>
+inline JSCallbackObject<Parent>* JSCallbackObject<Parent>::asCallbackObject(JSValue value)
 {
     ASSERT(asObject(value)->inherits(&s_info));
     return static_cast<JSCallbackObject*>(asObject(value));
 }
 
-template <class Base>
-JSCallbackObject<Base>::JSCallbackObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef jsClass, void* data)
-    : Base(globalObject, structure)
+template <class Parent>
+JSCallbackObject<Parent>::JSCallbackObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef jsClass, void* data)
+    : Parent(globalObject, structure)
     , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass)))
 {
-    ASSERT(Base::inherits(&s_info));
+    ASSERT(Parent::inherits(&s_info));
     init(exec);
 }
 
 // Global object constructor.
 // FIXME: Move this into a separate JSGlobalCallbackObject class derived from this one.
-template <class Base>
-JSCallbackObject<Base>::JSCallbackObject(JSGlobalData& globalData, JSClassRef jsClass, Structure* structure)
-    : Base(globalData, structure)
+template <class Parent>
+JSCallbackObject<Parent>::JSCallbackObject(JSGlobalData& globalData, JSClassRef jsClass, Structure* structure)
+    : Parent(globalData, structure)
     , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(0, jsClass)))
 {
-    ASSERT(Base::inherits(&s_info));
-    ASSERT(Base::isGlobalObject());
+    ASSERT(Parent::inherits(&s_info));
+    ASSERT(Parent::isGlobalObject());
     init(static_cast<JSGlobalObject*>(this)->globalExec());
 }
 
-template <class Base>
-void JSCallbackObject<Base>::init(ExecState* exec)
+template <class Parent>
+void JSCallbackObject<Parent>::init(ExecState* exec)
 {
     ASSERT(exec);
     
@@ -100,18 +100,18 @@ void JSCallbackObject<Base>::init(ExecState* exec)
     }
 }
 
-template <class Base>
-UString JSCallbackObject<Base>::className() const
+template <class Parent>
+UString JSCallbackObject<Parent>::className() const
 {
     UString thisClassName = classRef()->className();
     if (!thisClassName.isEmpty())
         return thisClassName;
     
-    return Base::className();
+    return Parent::className();
 }
 
-template <class Base>
-bool JSCallbackObject<Base>::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+template <class Parent>
+bool JSCallbackObject<Parent>::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
 {
     JSContextRef ctx = toRef(exec);
     JSObjectRef thisRef = toRef(this);
@@ -165,11 +165,11 @@ bool JSCallbackObject<Base>::getOwnPropertySlot(ExecState* exec, const Identifie
         }
     }
     
-    return Base::getOwnPropertySlot(exec, propertyName, slot);
+    return Parent::getOwnPropertySlot(exec, propertyName, slot);
 }
 
-template <class Base>
-bool JSCallbackObject<Base>::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+template <class Parent>
+bool JSCallbackObject<Parent>::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 {
     PropertySlot slot;
     if (getOwnPropertySlot(exec, propertyName, slot)) {
@@ -184,11 +184,11 @@ bool JSCallbackObject<Base>::getOwnPropertyDescriptor(ExecState* exec, const Ide
         return true;
     }
 
-    return Base::getOwnPropertyDescriptor(exec, propertyName, descriptor);
+    return Parent::getOwnPropertyDescriptor(exec, propertyName, descriptor);
 }
 
-template <class Base>
-void JSCallbackObject<Base>::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
+template <class Parent>
+void JSCallbackObject<Parent>::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
 {
     JSContextRef ctx = toRef(exec);
     JSObjectRef thisRef = toRef(this);
@@ -236,17 +236,17 @@ void JSCallbackObject<Base>::put(ExecState* exec, const Identifier& propertyName
             if (StaticFunctionEntry* entry = staticFunctions->get(propertyName.impl())) {
                 if (entry->attributes & kJSPropertyAttributeReadOnly)
                     return;
-                JSCallbackObject<Base>::putDirect(exec->globalData(), propertyName, value); // put as override property
+                JSCallbackObject<Parent>::putDirect(exec->globalData(), propertyName, value); // put as override property
                 return;
             }
         }
     }
     
-    return Base::put(exec, propertyName, value, slot);
+    return Parent::put(exec, propertyName, value, slot);
 }
 
-template <class Base>
-bool JSCallbackObject<Base>::deleteProperty(ExecState* exec, const Identifier& propertyName)
+template <class Parent>
+bool JSCallbackObject<Parent>::deleteProperty(ExecState* exec, const Identifier& propertyName)
 {
     JSContextRef ctx = toRef(exec);
     JSObjectRef thisRef = toRef(this);
@@ -285,17 +285,17 @@ bool JSCallbackObject<Base>::deleteProperty(ExecState* exec, const Identifier& p
         }
     }
     
-    return Base::deleteProperty(exec, propertyName);
+    return Parent::deleteProperty(exec, propertyName);
 }
 
-template <class Base>
-bool JSCallbackObject<Base>::deleteProperty(ExecState* exec, unsigned propertyName)
+template <class Parent>
+bool JSCallbackObject<Parent>::deleteProperty(ExecState* exec, unsigned propertyName)
 {
     return deleteProperty(exec, Identifier::from(exec, propertyName));
 }
 
-template <class Base>
-ConstructType JSCallbackObject<Base>::getConstructData(ConstructData& constructData)
+template <class Parent>
+ConstructType JSCallbackObject<Parent>::getConstructData(ConstructData& constructData)
 {
     for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) {
         if (jsClass->callAsConstructor) {
@@ -306,14 +306,14 @@ ConstructType JSCallbackObject<Base>::getConstructData(ConstructData& constructD
     return ConstructTypeNone;
 }
 
-template <class Base>
-EncodedJSValue JSCallbackObject<Base>::construct(ExecState* exec)
+template <class Parent>
+EncodedJSValue JSCallbackObject<Parent>::construct(ExecState* exec)
 {
     JSObject* constructor = exec->callee();
     JSContextRef execRef = toRef(exec);
     JSObjectRef constructorRef = toRef(constructor);
     
-    for (JSClassRef jsClass = static_cast<JSCallbackObject<Base>*>(constructor)->classRef(); jsClass; jsClass = jsClass->parentClass) {
+    for (JSClassRef jsClass = static_cast<JSCallbackObject<Parent>*>(constructor)->classRef(); jsClass; jsClass = jsClass->parentClass) {
         if (JSObjectCallAsConstructorCallback callAsConstructor = jsClass->callAsConstructor) {
             int argumentCount = static_cast<int>(exec->argumentCount());
             Vector<JSValueRef, 16> arguments(argumentCount);
@@ -335,8 +335,8 @@ EncodedJSValue JSCallbackObject<Base>::construct(ExecState* exec)
     return JSValue::encode(JSValue());
 }
 
-template <class Base>
-bool JSCallbackObject<Base>::hasInstance(ExecState* exec, JSValue value, JSValue)
+template <class Parent>
+bool JSCallbackObject<Parent>::hasInstance(ExecState* exec, JSValue value, JSValue)
 {
     JSContextRef execRef = toRef(exec);
     JSObjectRef thisRef = toRef(this);
@@ -358,8 +358,8 @@ bool JSCallbackObject<Base>::hasInstance(ExecState* exec, JSValue value, JSValue
     return false;
 }
 
-template <class Base>
-CallType JSCallbackObject<Base>::getCallData(CallData& callData)
+template <class Parent>
+CallType JSCallbackObject<Parent>::getCallData(CallData& callData)
 {
     for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) {
         if (jsClass->callAsFunction) {
@@ -370,14 +370,14 @@ CallType JSCallbackObject<Base>::getCallData(CallData& callData)
     return CallTypeNone;
 }
 
-template <class Base>
-EncodedJSValue JSCallbackObject<Base>::call(ExecState* exec)
+template <class Parent>
+EncodedJSValue JSCallbackObject<Parent>::call(ExecState* exec)
 {
     JSContextRef execRef = toRef(exec);
     JSObjectRef functionRef = toRef(exec->callee());
     JSObjectRef thisObjRef = toRef(exec->hostThisValue().toThisObject(exec));
     
-    for (JSClassRef jsClass = static_cast<JSCallbackObject<Base>*>(toJS(functionRef))->classRef(); jsClass; jsClass = jsClass->parentClass) {
+    for (JSClassRef jsClass = static_cast<JSCallbackObject<Parent>*>(toJS(functionRef))->classRef(); jsClass; jsClass = jsClass->parentClass) {
         if (JSObjectCallAsFunctionCallback callAsFunction = jsClass->callAsFunction) {
             int argumentCount = static_cast<int>(exec->argumentCount());
             Vector<JSValueRef, 16> arguments(argumentCount);
@@ -399,8 +399,8 @@ EncodedJSValue JSCallbackObject<Base>::call(ExecState* exec)
     return JSValue::encode(JSValue());
 }
 
-template <class Base>
-void JSCallbackObject<Base>::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
+template <class Parent>
+void JSCallbackObject<Parent>::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
 {
     JSContextRef execRef = toRef(exec);
     JSObjectRef thisRef = toRef(this);
@@ -434,11 +434,11 @@ void JSCallbackObject<Base>::getOwnPropertyNames(ExecState* exec, PropertyNameAr
         }
     }
     
-    Base::getOwnPropertyNames(exec, propertyNames, mode);
+    Parent::getOwnPropertyNames(exec, propertyNames, mode);
 }
 
-template <class Base>
-double JSCallbackObject<Base>::toNumber(ExecState* exec) const
+template <class Parent>
+double JSCallbackObject<Parent>::toNumber(ExecState* exec) const
 {
     // We need this check to guard against the case where this object is rhs of
     // a binary expression where lhs threw an exception in its conversion to
@@ -466,11 +466,11 @@ double JSCallbackObject<Base>::toNumber(ExecState* exec) const
                 return toJS(exec, value).getNumber(dValue) ? dValue : std::numeric_limits<double>::quiet_NaN();
         }
             
-    return Base::toNumber(exec);
+    return Parent::toNumber(exec);
 }
 
-template <class Base>
-UString JSCallbackObject<Base>::toString(ExecState* exec) const
+template <class Parent>
+UString JSCallbackObject<Parent>::toString(ExecState* exec) const
 {
     JSContextRef ctx = toRef(exec);
     JSObjectRef thisRef = toRef(this);
@@ -491,23 +491,23 @@ UString JSCallbackObject<Base>::toString(ExecState* exec) const
                 return toJS(exec, value).getString(exec);
         }
             
-    return Base::toString(exec);
+    return Parent::toString(exec);
 }
 
-template <class Base>
-void JSCallbackObject<Base>::setPrivate(void* data)
+template <class Parent>
+void JSCallbackObject<Parent>::setPrivate(void* data)
 {
     m_callbackObjectData->privateData = data;
 }
 
-template <class Base>
-void* JSCallbackObject<Base>::getPrivate()
+template <class Parent>
+void* JSCallbackObject<Parent>::getPrivate()
 {
     return m_callbackObjectData->privateData;
 }
 
-template <class Base>
-bool JSCallbackObject<Base>::inherits(JSClassRef c) const
+template <class Parent>
+bool JSCallbackObject<Parent>::inherits(JSClassRef c) const
 {
     for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass)
         if (jsClass == c)
@@ -516,8 +516,8 @@ bool JSCallbackObject<Base>::inherits(JSClassRef c) const
     return false;
 }
 
-template <class Base>
-JSValue JSCallbackObject<Base>::getStaticValue(ExecState* exec, const Identifier& propertyName)
+template <class Parent>
+JSValue JSCallbackObject<Parent>::getStaticValue(ExecState* exec, const Identifier& propertyName)
 {
     JSObjectRef thisRef = toRef(this);
     RefPtr<OpaqueJSString> propertyNameRef;
@@ -545,14 +545,14 @@ JSValue JSCallbackObject<Base>::getStaticValue(ExecState* exec, const Identifier
     return JSValue();
 }
 
-template <class Base>
-JSValue JSCallbackObject<Base>::staticFunctionGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)
+template <class Parent>
+JSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, JSValue slotParent, const Identifier& propertyName)
 {
-    JSCallbackObject* thisObj = asCallbackObject(slotBase);
+    JSCallbackObject* thisObj = asCallbackObject(slotParent);
     
     // Check for cached or override property.
     PropertySlot slot2(thisObj);
-    if (thisObj->Base::getOwnPropertySlot(exec, propertyName, slot2))
+    if (thisObj->Parent::getOwnPropertySlot(exec, propertyName, slot2))
         return slot2.getValue(exec, propertyName);
     
     for (JSClassRef jsClass = thisObj->classRef(); jsClass; jsClass = jsClass->parentClass) {
@@ -571,10 +571,10 @@ JSValue JSCallbackObject<Base>::staticFunctionGetter(ExecState* exec, JSValue sl
     return throwError(exec, createReferenceError(exec, "Static function property defined with NULL callAsFunction callback."));
 }
 
-template <class Base>
-JSValue JSCallbackObject<Base>::callbackGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)
+template <class Parent>
+JSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, JSValue slotParent, const Identifier& propertyName)
 {
-    JSCallbackObject* thisObj = asCallbackObject(slotBase);
+    JSCallbackObject* thisObj = asCallbackObject(slotParent);
     
     JSObjectRef thisRef = toRef(thisObj);
     RefPtr<OpaqueJSString> propertyNameRef;
index d350659..cacaaae 100644 (file)
@@ -1,3 +1,99 @@
+2011-08-09  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        Add ParentClass typedef in all JSC classes
+        https://bugs.webkit.org/show_bug.cgi?id=65731
+
+        Reviewed by Oliver Hunt.
+
+        Just added the Base typedefs in all the classes that are a subclass of JSCell 
+        to point at their parent classes.  This is a change to support future changes to the way
+        constructors and destructors are implemented in JS objects, among other things.
+
+        * API/JSCallbackConstructor.h:
+        * API/JSCallbackFunction.h:
+        * API/JSCallbackObject.h:
+        (JSC::JSCallbackObject::createStructure):
+        (JSC::JSCallbackObject::visitChildren):
+        * API/JSCallbackObjectFunctions.h:
+        (JSC::::asCallbackObject):
+        (JSC::::JSCallbackObject):
+        (JSC::::init):
+        (JSC::::className):
+        (JSC::::getOwnPropertySlot):
+        (JSC::::getOwnPropertyDescriptor):
+        (JSC::::put):
+        (JSC::::deleteProperty):
+        (JSC::::getConstructData):
+        (JSC::::construct):
+        (JSC::::hasInstance):
+        (JSC::::getCallData):
+        (JSC::::call):
+        (JSC::::getOwnPropertyNames):
+        (JSC::::toNumber):
+        (JSC::::toString):
+        (JSC::::setPrivate):
+        (JSC::::getPrivate):
+        (JSC::::inherits):
+        (JSC::::getStaticValue):
+        (JSC::::staticFunctionGetter):
+        (JSC::::callbackGetter):
+        * debugger/DebuggerActivation.h:
+        * jsc.cpp:
+        * runtime/Arguments.h:
+        * runtime/ArrayConstructor.h:
+        * runtime/ArrayPrototype.h:
+        * runtime/BooleanConstructor.h:
+        * runtime/BooleanObject.h:
+        * runtime/BooleanPrototype.h:
+        * runtime/DateConstructor.h:
+        * runtime/DateInstance.h:
+        * runtime/DatePrototype.h:
+        * runtime/Error.cpp:
+        * runtime/ErrorConstructor.h:
+        * runtime/ErrorInstance.h:
+        * runtime/ErrorPrototype.h:
+        * runtime/ExceptionHelpers.cpp:
+        * runtime/Executable.h:
+        * runtime/FunctionConstructor.h:
+        * runtime/FunctionPrototype.h:
+        * runtime/GetterSetter.h:
+        * runtime/InternalFunction.h:
+        * runtime/JSAPIValueWrapper.h:
+        * runtime/JSActivation.h:
+        * runtime/JSArray.h:
+        * runtime/JSFunction.h:
+        * runtime/JSGlobalObject.h:
+        * runtime/JSNotAnObject.h:
+        * runtime/JSONObject.h:
+        * runtime/JSObject.h:
+        * runtime/JSPropertyNameIterator.h:
+        * runtime/JSStaticScopeObject.h:
+        * runtime/JSString.h:
+        * runtime/JSVariableObject.h:
+        * runtime/JSWrapperObject.h:
+        * runtime/MathObject.h:
+        * runtime/NativeErrorConstructor.h:
+        * runtime/NativeErrorPrototype.h:
+        * runtime/NumberConstructor.h:
+        * runtime/NumberObject.h:
+        * runtime/NumberPrototype.h:
+        * runtime/ObjectConstructor.h:
+        * runtime/ObjectPrototype.h:
+        * runtime/RegExp.h:
+        * runtime/RegExpConstructor.h:
+        * runtime/RegExpMatchesArray.h:
+        * runtime/RegExpObject.h:
+        (JSC::RegExpObject::create):
+        * runtime/RegExpPrototype.h:
+        * runtime/ScopeChain.h:
+        * runtime/StrictEvalActivation.h:
+        * runtime/StringConstructor.h:
+        * runtime/StringObject.h:
+        * runtime/StringObjectThatMasqueradesAsUndefined.h:
+        * runtime/StringPrototype.h:
+        * runtime/Structure.h:
+        * runtime/StructureChain.h:
+
 2011-08-08  Oliver Hunt  <oliver@apple.com>
 
         Using mprotect to create guard pages breaks our use of madvise to release executable memory
index 98f7e73..4733fe6 100644 (file)
@@ -34,6 +34,8 @@ namespace JSC {
 
     class DebuggerActivation : public JSNonFinalObject {
     public:
+        typedef JSNonFinalObject Base;
+
         static DebuggerActivation* create(JSGlobalData& globalData, JSObject* object)
         {
             return new (allocateCell<DebuggerActivation>(globalData.heap)) DebuggerActivation(globalData, object);
index 5ff0cb0..afeb5d9 100644 (file)
@@ -148,6 +148,8 @@ private:
     GlobalObject(JSGlobalData&, Structure*, const Vector<UString>& arguments);
 
 public:
+    typedef JSGlobalObject Base;
+
     static GlobalObject* create(JSGlobalData& globalData, Structure* structure, const Vector<UString>& arguments)
     {
         return new (allocateCell<GlobalObject>(globalData.heap)) GlobalObject(globalData, structure, arguments);
index 7391dff..886780c 100644 (file)
@@ -59,6 +59,8 @@ namespace JSC {
 
     class Arguments : public JSNonFinalObject {
     public:
+        typedef JSNonFinalObject Base;
+
         static Arguments* create(JSGlobalData& globalData, CallFrame* callFrame)
         {
             return new (allocateCell<Arguments>(globalData.heap)) Arguments(callFrame);
index e44c21d..6c98130 100644 (file)
@@ -28,10 +28,9 @@ namespace JSC {
     class ArrayPrototype;
 
     class ArrayConstructor : public InternalFunction {
-    private:
-        ArrayConstructor(ExecState*, JSGlobalObject*, Structure*, ArrayPrototype*);
-        
     public:
+        typedef InternalFunction Base;
+
         static ArrayConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ArrayPrototype* arrPrototype)
         {
             return new (allocateCell<ArrayConstructor>(*exec->heap())) ArrayConstructor(exec, globalObject, structure, arrPrototype);
@@ -48,6 +47,7 @@ namespace JSC {
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
     private:
+        ArrayConstructor(ExecState*, JSGlobalObject*, Structure*, ArrayPrototype*);
         virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
         virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
 
index 4016c7d..124c61a 100644 (file)
@@ -31,6 +31,8 @@ namespace JSC {
         ArrayPrototype(JSGlobalObject*, Structure*);
 
     public:
+        typedef JSArray Base;
+
         static ArrayPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<ArrayPrototype>(*exec->heap())) ArrayPrototype(globalObject, structure);
index d5cefb5..e7ea583 100644 (file)
@@ -28,16 +28,16 @@ namespace JSC {
     class BooleanPrototype;
 
     class BooleanConstructor : public InternalFunction {
-    private:
-        BooleanConstructor(ExecState*, JSGlobalObject*, Structure*, BooleanPrototype*);
-        
     public:
+        typedef InternalFunction Base;
+
         static BooleanConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, BooleanPrototype* boolPrototype)
         {
             return new (allocateCell<BooleanConstructor>(*exec->heap())) BooleanConstructor(exec, globalObject, structure, boolPrototype);
         }
 
     private:
+        BooleanConstructor(ExecState*, JSGlobalObject*, Structure*, BooleanPrototype*);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
     };
index 8533299..70ed126 100644 (file)
@@ -30,6 +30,8 @@ namespace JSC {
         BooleanObject(JSGlobalData&, Structure*);
 
     public:
+        typedef JSWrapperObject Base;
+
         static BooleanObject* create(JSGlobalData& globalData, Structure* structure)
         {
             return new (allocateCell<BooleanObject>(globalData.heap)) BooleanObject(globalData, structure);
index dc67997..459fe56 100644 (file)
 namespace JSC {
 
     class BooleanPrototype : public BooleanObject {
-    private:
-        BooleanPrototype(ExecState*, JSGlobalObject*, Structure*);
-
     public:
+        typedef BooleanObject Base;
+
         static BooleanPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<BooleanPrototype>(*exec->heap())) BooleanPrototype(exec, globalObject, structure);
@@ -47,6 +46,7 @@ namespace JSC {
         static const unsigned AnonymousSlotCount = BooleanObject::AnonymousSlotCount + 1;
 
     private:
+        BooleanPrototype(ExecState*, JSGlobalObject*, Structure*);
         virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
         virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
     };
index 633c213..d33da47 100644 (file)
@@ -28,10 +28,9 @@ namespace JSC {
     class DatePrototype;
 
     class DateConstructor : public InternalFunction {
-    private:
-        DateConstructor(ExecState*, JSGlobalObject*, Structure*, DatePrototype*);
-        
     public:
+        typedef InternalFunction Base;
+
         static DateConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, DatePrototype* datePrototype)
         {
             return new (allocateCell<DateConstructor>(*exec->heap())) DateConstructor(exec, globalObject, structure, datePrototype);
@@ -48,6 +47,7 @@ namespace JSC {
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
     private:
+        DateConstructor(ExecState*, JSGlobalObject*, Structure*, DatePrototype*);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
 
index 77e0ce7..af2dfa0 100644 (file)
@@ -35,6 +35,8 @@ namespace JSC {
         DateInstance(ExecState*, Structure*);
         
     public:
+        typedef JSWrapperObject Base;
+
         static DateInstance* create(ExecState* exec, Structure* structure, double date)
         {
             return new (allocateCell<DateInstance>(*exec->heap())) DateInstance(exec, structure, date);
index e38ff70..7dee330 100644 (file)
@@ -32,6 +32,8 @@ namespace JSC {
         DatePrototype(ExecState*, JSGlobalObject*, Structure*);
 
     public:
+        typedef DateInstance Base;
+
         static DatePrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<DatePrototype>(*exec->heap())) DatePrototype(exec, globalObject, structure);
index 2bbbc53..786750b 100644 (file)
@@ -174,6 +174,8 @@ private:
     }
 
 public:
+    typedef InternalFunction Base;
+
     static StrictModeTypeErrorFunction* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& message)
     {
         return new (allocateCell<StrictModeTypeErrorFunction>(*exec->heap())) StrictModeTypeErrorFunction(exec, globalObject, structure, message);
index 8d777a6..3877a6d 100644 (file)
@@ -29,16 +29,16 @@ namespace JSC {
     class ErrorPrototype;
 
     class ErrorConstructor : public InternalFunction {
-    private:
-        ErrorConstructor(ExecState*, JSGlobalObject*, Structure*, ErrorPrototype*);
-
     public:
+        typedef InternalFunction Base;
+
         static ErrorConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ErrorPrototype* errPrototype)
         {
             return new (allocateCell<ErrorConstructor>(*exec->heap())) ErrorConstructor(exec, globalObject, structure, errPrototype);
         }
         
     private:
+        ErrorConstructor(ExecState*, JSGlobalObject*, Structure*, ErrorPrototype*);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
     };
index c63093b..d61ee97 100644 (file)
@@ -27,6 +27,8 @@ namespace JSC {
 
     class ErrorInstance : public JSNonFinalObject {
     public:
+        typedef JSNonFinalObject Base;
+
         static const ClassInfo s_info;
 
         static Structure* createStructure(JSGlobalData& globalData, JSValue prototype)
index 0e73803..4052836 100644 (file)
@@ -28,10 +28,9 @@ namespace JSC {
     class ObjectPrototype;
 
     class ErrorPrototype : public ErrorInstance {
-    protected:
-        ErrorPrototype(ExecState*, JSGlobalObject*, Structure*);
-
     public:
+        typedef ErrorInstance Base;
+
         static ErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<ErrorPrototype>(*exec->heap())) ErrorPrototype(exec, globalObject, structure);
@@ -45,6 +44,7 @@ namespace JSC {
         }
 
     protected:
+        ErrorPrototype(ExecState*, JSGlobalObject*, Structure*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ErrorInstance::StructureFlags;
         static const unsigned AnonymousSlotCount = ErrorInstance::AnonymousSlotCount + 1;
 
index a4c0c6c..981f7c4 100644 (file)
@@ -49,6 +49,8 @@ private:
     }
 
 public:
+    typedef JSNonFinalObject Base;
+
     static InterruptedExecutionError* create(JSGlobalData& globalData)
     {
         return new (allocateCell<InterruptedExecutionError>(globalData.heap)) InterruptedExecutionError(globalData);
@@ -72,6 +74,8 @@ private:
     }
 
 public:
+    typedef JSNonFinalObject Base;
+
     static TerminatedExecutionError* create(JSGlobalData& globalData)
     {
         return new (allocateCell<TerminatedExecutionError>(globalData.heap)) TerminatedExecutionError(globalData);
index 38741fc..bab32b2 100644 (file)
@@ -53,7 +53,6 @@ namespace JSC {
         static const int NUM_PARAMETERS_IS_HOST = 0;
         static const int NUM_PARAMETERS_NOT_COMPILED = -1;
 
-    protected:
         ExecutableBase(JSGlobalData& globalData, Structure* structure, int numParameters)
             : JSCell(globalData, structure)
             , m_numParametersForCall(numParameters)
@@ -66,6 +65,8 @@ namespace JSC {
         }
         
     public:
+        typedef JSCell Base;
+
         static ExecutableBase* create(JSGlobalData& globalData, Structure* structure, int numParameters)
         {
             return new (allocateCell<ExecutableBase>(globalData.heap)) ExecutableBase(globalData, structure, numParameters);
@@ -168,6 +169,8 @@ namespace JSC {
     class NativeExecutable : public ExecutableBase {
         friend class JIT;
     public:
+        typedef ExecutableBase Base;
+
 #if ENABLE(JIT)
         static NativeExecutable* create(JSGlobalData& globalData, MacroAssemblerCodePtr callThunk, NativeFunction function, MacroAssemblerCodePtr constructThunk, NativeFunction constructor)
         {
@@ -219,6 +222,8 @@ namespace JSC {
 
     class ScriptExecutable : public ExecutableBase {
     public:
+        typedef ExecutableBase Base;
+
         ScriptExecutable(Structure* structure, JSGlobalData& globalData, const SourceCode& source, bool isInStrictContext)
             : ExecutableBase(globalData, structure, NUM_PARAMETERS_NOT_COMPILED)
             , m_source(source)
@@ -277,6 +282,7 @@ namespace JSC {
 
     class EvalExecutable : public ScriptExecutable {
     public:
+        typedef ScriptExecutable Base;
 
         ~EvalExecutable();
 
@@ -326,6 +332,8 @@ namespace JSC {
 
     class ProgramExecutable : public ScriptExecutable {
     public:
+        typedef ScriptExecutable Base;
+
         static ProgramExecutable* create(ExecState* exec, const SourceCode& source)
         {
             return new (allocateCell<ProgramExecutable>(*exec->heap())) ProgramExecutable(exec, source);
@@ -379,6 +387,8 @@ namespace JSC {
     class FunctionExecutable : public ScriptExecutable {
         friend class JIT;
     public:
+        typedef ScriptExecutable Base;
+
         static FunctionExecutable* create(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, bool isInStrictContext, int firstLine, int lastLine)
         {
             return new (allocateCell<FunctionExecutable>(*exec->heap())) FunctionExecutable(exec, name, source, forceUsesArguments, parameters, isInStrictContext, firstLine, lastLine);
index fc40f40..9c55d88 100644 (file)
@@ -28,16 +28,16 @@ namespace JSC {
     class FunctionPrototype;
 
     class FunctionConstructor : public InternalFunction {
-    private:
-        FunctionConstructor(ExecState*, JSGlobalObject*, Structure*, FunctionPrototype*);
-    
     public:
+        typedef InternalFunction Base;
+
         static FunctionConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, FunctionPrototype* funcPrototype)
         {
             return new (allocateCell<FunctionConstructor>(*exec->heap())) FunctionConstructor(exec, globalObject, structure, funcPrototype);
         }
 
     private:
+        FunctionConstructor(ExecState*, JSGlobalObject*, Structure*, FunctionPrototype*);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
     };
index 152e059..e57ca9d 100644 (file)
 namespace JSC {
 
     class FunctionPrototype : public InternalFunction {
-    private:
-        FunctionPrototype(ExecState*, JSGlobalObject*, Structure*);
-
     public:
+        typedef InternalFunction Base;
+
         static FunctionPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<FunctionPrototype>(*exec->heap())) FunctionPrototype(exec, globalObject, structure);
@@ -43,6 +42,7 @@ namespace JSC {
         }
 
     private:
+        FunctionPrototype(ExecState*, JSGlobalObject*, Structure*);
         virtual CallType getCallData(CallData&);
     };
 
index f2ec3bb..03dbb66 100644 (file)
@@ -44,6 +44,8 @@ namespace JSC {
         }
 
     public:
+        typedef JSCell Base;
+
         static GetterSetter* create(ExecState* exec)
         {
             return new (allocateCell<GetterSetter>(*exec->heap())) GetterSetter(exec);
index 28e260e..83243b3 100644 (file)
@@ -33,6 +33,8 @@ namespace JSC {
 
     class InternalFunction : public JSObjectWithGlobalObject {
     public:
+        typedef JSObjectWithGlobalObject Base;
+
         static JS_EXPORTDATA const ClassInfo s_info;
 
         const UString& name(ExecState*);
index 19dfb33..5648fb8 100644 (file)
@@ -32,6 +32,8 @@ namespace JSC {
     class JSAPIValueWrapper : public JSCell {
         friend JSValue jsAPIValueWrapper(ExecState*, JSValue);
     public:
+        typedef JSCell Base;
+
         JSValue value() const { return m_value.get(); }
 
         virtual bool isAPIValueWrapper() const { return true; }
index 42c3d56..f1591aa 100644 (file)
@@ -41,10 +41,11 @@ namespace JSC {
     
     class JSActivation : public JSVariableObject {
     private:
-        typedef JSVariableObject Base;
         JSActivation(CallFrame*, FunctionExecutable*);
     
     public:
+        typedef JSVariableObject Base;
+
         static JSActivation* create(JSGlobalData& globalData, CallFrame* callFrame, FunctionExecutable* funcExec)
         {
             return new (allocateCell<JSActivation>(globalData.heap)) JSActivation(callFrame, funcExec);
index 1744ba5..7ff5e23 100644 (file)
@@ -66,6 +66,8 @@ namespace JSC {
         JSArray(JSGlobalData&, Structure*, const ArgList& initialValues);
         
     public:
+        typedef JSNonFinalObject Base;
+
         JSArray(VPtrStealingHackType);
         virtual ~JSArray();
 
index 006a7db..29cbfd0 100644 (file)
@@ -46,13 +46,13 @@ namespace JSC {
         friend class DFG::JITCodeGenerator;
         friend class JSGlobalData;
 
-        typedef JSObjectWithGlobalObject Base;
-
         JSFunction(ExecState*, JSGlobalObject*, Structure*, int length, const Identifier&, NativeFunction);
         JSFunction(ExecState*, JSGlobalObject*, Structure*, int length, const Identifier&, NativeExecutable*);
         JSFunction(ExecState*, FunctionExecutable*, ScopeChainNode*);
         
     public:
+        typedef JSObjectWithGlobalObject Base;
+
         static JSFunction* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, int length, const Identifier& ident, NativeFunction nativeFunc)
         {
             return new (allocateCell<JSFunction>(*exec->heap())) JSFunction(exec, globalObject, structure, length, ident, nativeFunc);
index 4dc9f58..59cad50 100644 (file)
@@ -142,6 +142,8 @@ namespace JSC {
         }
         
     public:
+        typedef JSVariableObject Base;
+
         static JSGlobalObject* create(JSGlobalData& globalData, Structure* structure)
         {
             return new (allocateCell<JSGlobalObject>(globalData.heap)) JSGlobalObject(globalData, structure);
index 4547a59..904b7ff 100644 (file)
@@ -44,6 +44,8 @@ namespace JSC {
         }
         
     public:
+        typedef JSNonFinalObject Base;
+
         static JSNotAnObject* create(ExecState* exec)
         {
             return new (allocateCell<JSNotAnObject>(*exec->heap())) JSNotAnObject(exec);
index ecf0921..77bf436 100644 (file)
@@ -33,10 +33,9 @@ namespace JSC {
     class Stringifier;
 
     class JSONObject : public JSObjectWithGlobalObject {
-    private:
-        JSONObject(JSGlobalObject*, Structure*);
-
     public:
+        typedef JSObjectWithGlobalObject Base;
+
         static JSONObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<JSONObject>(*exec->heap())) JSONObject(globalObject, structure);
@@ -53,6 +52,7 @@ namespace JSC {
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags;
 
     private:
+        JSONObject(JSGlobalObject*, Structure*);
         virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
         virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
 
index 3656e22..7687bfa 100644 (file)
@@ -80,6 +80,8 @@ namespace JSC {
         friend void setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* thisObj, const Identifier& propertyName, PropertySlot& slot);
 
     public:
+        typedef JSCell Base;
+
         virtual void visitChildren(SlotVisitor&);
         ALWAYS_INLINE void visitChildrenDirect(SlotVisitor&);
 
@@ -332,6 +334,8 @@ COMPILE_ASSERT((JSFinalObject_inlineStorageCapacity >= JSNonFinalObject_inlineSt
         friend class JSObject;
 
     public:
+        typedef JSObject Base;
+
         static Structure* createStructure(JSGlobalData& globalData, JSValue prototype)
         {
             return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
@@ -360,6 +364,8 @@ COMPILE_ASSERT((JSFinalObject_inlineStorageCapacity >= JSNonFinalObject_inlineSt
         friend class JSObject;
 
     public:
+        typedef JSObject Base;
+
         explicit JSFinalObject(VPtrStealingHackType)
             : JSObject(VPtrStealingHack, m_inlineStorage)
         {
index 8957412..d2b611d 100644 (file)
@@ -43,6 +43,8 @@ namespace JSC {
         friend class JIT;
 
     public:
+        typedef JSCell Base;
+
         static JSPropertyNameIterator* create(ExecState*, JSObject*);
         static JSPropertyNameIterator* create(ExecState* exec, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlot)
         {
index cd47514..b1193fd 100644 (file)
@@ -32,6 +32,8 @@ namespace JSC{
     
     class JSStaticScopeObject : public JSVariableObject {
     public:
+        typedef JSVariableObject Base;
+
         static JSStaticScopeObject* create(ExecState* exec, const Identifier& ident, JSValue value, unsigned attributes)
         {
             return new (allocateCell<JSStaticScopeObject>(*exec->heap())) JSStaticScopeObject(exec, ident, value, attributes);
index 5490864..3171175 100644 (file)
@@ -66,6 +66,8 @@ namespace JSC {
         friend class SpecializedThunkJIT;
         friend struct ThunkHelpers;
 
+        typedef JSCell Base;
+
         class RopeBuilder {
         public:
             RopeBuilder(unsigned fiberCount)
index 0999fa5..eb1f03c 100644 (file)
@@ -44,6 +44,8 @@ namespace JSC {
         friend class JIT;
 
     public:
+        typedef JSNonFinalObject Base;
+
         SymbolTable& symbolTable() const { return *m_symbolTable; }
 
         virtual void putWithAttributes(ExecState*, const Identifier&, JSValue, unsigned attributes) = 0;
index 8972648..3e589f2 100644 (file)
@@ -29,10 +29,9 @@ namespace JSC {
     // This class is used as a base for classes such as String,
     // Number, Boolean and Date which are wrappers for primitive types.
     class JSWrapperObject : public JSNonFinalObject {
-    protected:
-        explicit JSWrapperObject(JSGlobalData&, Structure*);
-
     public:
+        typedef JSNonFinalObject Base;
+
         JSValue internalValue() const;
         void setInternalValue(JSGlobalData&, JSValue);
 
@@ -42,6 +41,7 @@ namespace JSC {
         }
 
     protected:
+        explicit JSWrapperObject(JSGlobalData&, Structure*);
         static const unsigned StructureFlags = OverridesVisitChildren | JSNonFinalObject::StructureFlags;
 
     private:
index b8850fe..9cfa8d0 100644 (file)
@@ -30,6 +30,8 @@ namespace JSC {
         MathObject(ExecState*, JSGlobalObject*, Structure*);
 
     public:
+        typedef JSObjectWithGlobalObject Base;
+
         static MathObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<MathObject>(*exec->heap())) MathObject(exec, globalObject, structure);
index 3a15ca4..3eabc7a 100644 (file)
@@ -30,10 +30,9 @@ namespace JSC {
     class NativeErrorPrototype;
 
     class NativeErrorConstructor : public InternalFunction {
-    private:
-        NativeErrorConstructor(ExecState*, JSGlobalObject*, Structure*, Structure* prototypeStructure, const UString&);
-
     public:
+        typedef InternalFunction Base;
+
         static NativeErrorConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, Structure* prototypeStructure, const UString& nameAndMessage)
         {
             return new (allocateCell<NativeErrorConstructor>(*exec->heap())) NativeErrorConstructor(exec, globalObject, structure, prototypeStructure, nameAndMessage);
@@ -49,6 +48,7 @@ namespace JSC {
         Structure* errorStructure() { return m_errorStructure.get(); }
 
     private:
+        NativeErrorConstructor(ExecState*, JSGlobalObject*, Structure*, Structure* prototypeStructure, const UString&);
         static const unsigned StructureFlags = OverridesVisitChildren | InternalFunction::StructureFlags;
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
index d1035a8..1bb2309 100644 (file)
@@ -31,6 +31,8 @@ namespace JSC {
         NativeErrorPrototype(ExecState*, JSGlobalObject*, Structure*, const UString&, NativeErrorConstructor*);
     
     public:
+        typedef ErrorPrototype Base;
+
         static NativeErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& nameAndMessage, NativeErrorConstructor* constructor)
         {
             return new (allocateCell<NativeErrorPrototype>(*exec->heap())) NativeErrorPrototype(exec, globalObject, structure, nameAndMessage, constructor);
index 359a6af..755d0b4 100644 (file)
@@ -28,10 +28,9 @@ namespace JSC {
     class NumberPrototype;
 
     class NumberConstructor : public InternalFunction {
-    private:
-        NumberConstructor(ExecState*, JSGlobalObject*, Structure*, NumberPrototype*);
-        
     public:
+        typedef InternalFunction Base;
+
         static NumberConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, NumberPrototype* numPrototype)
         {
             return new (allocateCell<NumberConstructor>(*exec->heap())) NumberConstructor(exec, globalObject, structure, numPrototype);
@@ -54,6 +53,7 @@ namespace JSC {
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags;
 
     private:
+        NumberConstructor(ExecState*, JSGlobalObject*, Structure*, NumberPrototype*);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
     };
index 92f74f5..7ac81d6 100644 (file)
@@ -30,6 +30,8 @@ namespace JSC {
         NumberObject(JSGlobalData&, Structure*);
 
     public:
+        typedef JSWrapperObject Base;
+
         static NumberObject* create(JSGlobalData& globalData, Structure* structure)
         {
             return new (allocateCell<NumberObject>(globalData.heap)) NumberObject(globalData, structure);
index 7fd0fb9..db6fece 100644 (file)
 namespace JSC {
 
     class NumberPrototype : public NumberObject {
-    private:
-        NumberPrototype(ExecState*, JSGlobalObject*, Structure*);
-
     public:
+        typedef NumberObject Base;
+
         static NumberPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<NumberPrototype>(*exec->heap())) NumberPrototype(exec, globalObject, structure);
@@ -47,6 +46,7 @@ namespace JSC {
         static const unsigned AnonymousSlotCount = NumberObject::AnonymousSlotCount + 1;
 
     private:
+        NumberPrototype(ExecState*, JSGlobalObject*, Structure*);
         virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
         virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
     };
index c0027ed..8f14361 100644 (file)
@@ -28,10 +28,9 @@ namespace JSC {
     class ObjectPrototype;
 
     class ObjectConstructor : public InternalFunction {
-    private:
-        ObjectConstructor(ExecState*, JSGlobalObject*, Structure*, ObjectPrototype*);
-    
     public:
+        typedef InternalFunction Base;
+
         static ObjectConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ObjectPrototype* objPrototype)
         {
             return new (allocateCell<ObjectConstructor>(*exec->heap())) ObjectConstructor(exec, globalObject, structure, objPrototype);
@@ -51,6 +50,7 @@ namespace JSC {
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
     private:
+        ObjectConstructor(ExecState*, JSGlobalObject*, Structure*, ObjectPrototype*);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
     };
index 0e7cd6f..bc63b35 100644 (file)
 namespace JSC {
 
     class ObjectPrototype : public JSNonFinalObject {
-    private:
-        ObjectPrototype(ExecState*, JSGlobalObject*, Structure*);
-
     public:
+        typedef JSNonFinalObject Base;
+
         static ObjectPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<ObjectPrototype>(*exec->heap())) ObjectPrototype(exec, globalObject, structure);
@@ -47,6 +46,7 @@ namespace JSC {
         static const unsigned AnonymousSlotCount = JSNonFinalObject::AnonymousSlotCount + 1;
 
     private:
+        ObjectPrototype(ExecState*, JSGlobalObject*, Structure*);
         virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&);
         virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
         virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&);
index 3b55b63..812a86c 100644 (file)
@@ -38,6 +38,8 @@ namespace JSC {
 
     class RegExp : public JSCell {
     public:
+        typedef JSCell Base;
+
         static RegExp* create(JSGlobalData&, const UString& pattern, RegExpFlags);
         ~RegExp();
 
index 70469ef..0a7cb6e 100644 (file)
@@ -56,10 +56,9 @@ namespace JSC {
     };
 
     class RegExpConstructor : public InternalFunction {
-    private:
-        RegExpConstructor(ExecState*, JSGlobalObject*, Structure*, RegExpPrototype*);
-
     public:
+        typedef InternalFunction Base;
+
         static RegExpConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExpPrototype* regExpPrototype)
         {
             return new (allocateCell<RegExpConstructor>(*exec->heap())) RegExpConstructor(exec, globalObject, structure, regExpPrototype);
@@ -94,6 +93,7 @@ namespace JSC {
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags;
 
     private:
+        RegExpConstructor(ExecState*, JSGlobalObject*, Structure*, RegExpPrototype*);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
 
index 5e53a80..ed21bc8 100644 (file)
@@ -29,6 +29,8 @@ namespace JSC {
         RegExpMatchesArray(ExecState*, RegExpConstructorPrivate*);
 
     public:
+        typedef JSArray Base;
+
         static RegExpMatchesArray* create(ExecState* exec, RegExpConstructorPrivate* ctorPrivate)
         {
             return new (allocateCell<RegExpMatchesArray>(*exec->heap())) RegExpMatchesArray(exec, ctorPrivate);
index 52dd75a..73f2154 100644 (file)
 namespace JSC {
     
     class RegExpObject : public JSObjectWithGlobalObject {
-    protected:
-        RegExpObject(JSGlobalObject*, Structure*, RegExp*);
-
     public:
+        typedef JSObjectWithGlobalObject Base;
+
         static RegExpObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp)
         {
             return new (allocateCell<RegExpObject>(*exec->heap())) RegExpObject(globalObject, structure, regExp);
@@ -40,8 +39,6 @@ namespace JSC {
         {
             return new (allocateCell<RegExpObject>(globalData.heap)) RegExpObject(globalObject, structure, regExp);
         }
-        
-        typedef JSObjectWithGlobalObject Base;
 
         virtual ~RegExpObject();
 
@@ -76,6 +73,7 @@ namespace JSC {
         }
 
     protected:
+        RegExpObject(JSGlobalObject*, Structure*, RegExp*);
         static const unsigned StructureFlags = OverridesVisitChildren | OverridesGetOwnPropertySlot | JSObjectWithGlobalObject::StructureFlags;
 
     private:
index b60af74..3abfb3b 100644 (file)
 namespace JSC {
 
     class RegExpPrototype : public RegExpObject {
-    protected:
-        RegExpPrototype(ExecState*, JSGlobalObject*, Structure*, RegExp*);
-
     public:
+        typedef RegExpObject Base;
+
         static RegExpPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp)
         {
             return new (allocateCell<RegExpPrototype>(*exec->heap())) RegExpPrototype(exec, globalObject, structure, regExp);
@@ -44,6 +43,7 @@ namespace JSC {
         }
 
     protected:
+        RegExpPrototype(ExecState*, JSGlobalObject*, Structure*, RegExp*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | RegExpObject::StructureFlags;
 
     private:
index c7e0f52..cf1a596 100644 (file)
@@ -48,6 +48,8 @@ namespace JSC {
         }
 
     public:
+        typedef JSCell Base;
+
         static ScopeChainNode* create(ExecState* exec, ScopeChainNode* next, JSObject* object, JSGlobalData* globalData, JSGlobalObject* globalObject, JSObject* globalThis)
         {
             return new (allocateCell<ScopeChainNode>(*exec->heap())) ScopeChainNode(next, object, globalData, globalObject, globalThis);
index ddb58e9..76981fd 100644 (file)
@@ -32,6 +32,8 @@ namespace JSC {
 
 class StrictEvalActivation : public JSNonFinalObject {
 public:
+    typedef JSNonFinalObject Base;
+
     static StrictEvalActivation* create(ExecState* exec)
     {
         return new (allocateCell<StrictEvalActivation>(*exec->heap())) StrictEvalActivation(exec);
index 54a6cfe..faa79c3 100644 (file)
@@ -28,10 +28,9 @@ namespace JSC {
     class StringPrototype;
 
     class StringConstructor : public InternalFunction {
-    private:
-        StringConstructor(ExecState*, JSGlobalObject*, Structure*, StringPrototype*);
-        
     public:
+        typedef InternalFunction Base;
+
         static StringConstructor* create(ExecState* exec, JSGlobalObject* globalObject , Structure* structure, StringPrototype* strPrototype)
         {
             return new (allocateCell<StringConstructor>(*exec->heap())) StringConstructor(exec, globalObject, structure, strPrototype);
@@ -48,6 +47,7 @@ namespace JSC {
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
     private:
+        StringConstructor(ExecState*, JSGlobalObject*, Structure*, StringPrototype*);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
 
index 575eab8..80e5bec 100644 (file)
 namespace JSC {
 
     class StringObject : public JSWrapperObject {
-    protected:
-        StringObject(ExecState*, Structure*);
-        StringObject(ExecState*, Structure*, const UString&);
-                
     public:
+        typedef JSWrapperObject Base;
+
         static StringObject* create(ExecState* exec, Structure* structure)
         {
             return new (allocateCell<StringObject>(*exec->heap())) StringObject(exec, structure);  
@@ -61,6 +59,8 @@ namespace JSC {
         }
 
     protected:
+        StringObject(ExecState*, Structure*);
+        StringObject(ExecState*, Structure*, const UString&);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | JSWrapperObject::StructureFlags;
         StringObject(JSGlobalData&, Structure*, JSString*);
     };
index 9317360..d4230ea 100644 (file)
@@ -30,6 +30,8 @@ namespace JSC {
     // WebCore uses this to make style.filter undetectable
     class StringObjectThatMasqueradesAsUndefined : public StringObject {
     public:
+        typedef StringObject Base;
+
         static StringObjectThatMasqueradesAsUndefined* create(ExecState* exec, const UString& string)
         {
             return new (allocateCell<StringObjectThatMasqueradesAsUndefined>(*exec->heap())) StringObjectThatMasqueradesAsUndefined(exec,
index 72ede9d..03a67d8 100644 (file)
@@ -32,6 +32,8 @@ namespace JSC {
         StringPrototype(ExecState*, JSGlobalObject*, Structure*);
 
     public:
+        typedef StringObject Base;
+
         static StringPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
             return new (allocateCell<StringPrototype>(*exec->heap())) StringPrototype(exec, globalObject, structure);
index e6a2038..efc75c4 100644 (file)
@@ -59,6 +59,9 @@ namespace JSC {
     class Structure : public JSCell {
     public:
         friend class StructureTransitionTable;
+
+        typedef JSCell Base;
+
         static Structure* create(JSGlobalData& globalData, JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo)
         {
             ASSERT(globalData.structureStructure);
index 28d346e..f86a9aa 100644 (file)
@@ -42,6 +42,8 @@ namespace JSC {
         friend class JIT;
 
     public:
+        typedef JSCell Base;
+
         static StructureChain* create(JSGlobalData& globalData, Structure* head) { return new (allocateCell<StructureChain>(globalData.heap)) StructureChain(globalData, globalData.structureChainStructure.get(), head); }
         WriteBarrier<Structure>* head() { return m_vector.get(); }
         void visitChildren(SlotVisitor&);
index 1a40b73..3f03256 100644 (file)
@@ -1,3 +1,17 @@
+2011-08-09  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        Add ParentClass typedef in all JSC classes
+        https://bugs.webkit.org/show_bug.cgi?id=65731
+
+        Reviewed by Oliver Hunt.
+
+        Just added the Base typedefs in all the classes that are a subclass of JSCell 
+        to point at their parent classes.  This is a change to support future changes to the way
+        constructors and destructors are implemented in JS objects, among other things.
+
+        * JSRun.h:
+        * UserObjectImp.h:
+
 2011-08-04  Mark Rowe  <mrowe@apple.com>
 
         Future-proof Xcode configuration settings.
index c59dfe0..aaeccae 100644 (file)
@@ -35,6 +35,8 @@
 
 class JSGlueGlobalObject : public JSGlobalObject {
     public:
+        typedef JSGlobalObject Base;
+
         static JSGlueGlobalObject* create(JSGlobalData& globalData, Structure* structure, JSFlags flags = kJSFlagNone)
         {
             return new (allocateCell<JSGlueGlobalObject>(globalData.heap)) JSGlueGlobalObject(globalData, structure, flags);
index d965cf2..8ee8e2a 100644 (file)
@@ -36,6 +36,8 @@
 
 class UserObjectImp : public JSNonFinalObject {
 public:
+    typedef JSNonFinalObject Base;
+
     static UserObjectImp* create(JSGlobalData& globalData, Structure* structure, JSUserObject* userObject)
     {
         return new (allocateCell<UserObjectImp>(globalData.heap)) UserObjectImp(globalData, structure, userObject);
index a99de90..bbef34e 100644 (file)
@@ -1,3 +1,45 @@
+2011-08-09  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        Add ParentClass typedef in all JSC classes
+        https://bugs.webkit.org/show_bug.cgi?id=65731
+
+        Reviewed by Oliver Hunt.
+
+        No new tests.
+
+        Just added the Base typedefs in all the classes that are a subclass of JSCell 
+        to point at their parent classes.  This is a change to support future changes to the way
+        constructors and destructors are implemented in JS objects, among other things.
+
+        * bindings/js/JSAudioConstructor.h:
+        * bindings/js/JSImageConstructor.h:
+        * bindings/js/JSOptionConstructor.h:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        (GenerateConstructorDeclaration):
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        * bindings/scripts/test/JS/JSTestInterface.h:
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
+        * bridge/c/CRuntimeObject.h:
+        * bridge/c/c_instance.cpp:
+        * bridge/jni/jsc/JavaInstanceJSC.cpp:
+        * bridge/jni/jsc/JavaRuntimeObject.h:
+        * bridge/objc/ObjCRuntimeObject.h:
+        * bridge/objc/objc_runtime.h:
+        * bridge/qt/qt_instance.cpp:
+        * bridge/qt/qt_pixmapruntime.cpp:
+        * bridge/qt/qt_runtime.h:
+        * bridge/runtime_array.h:
+        * bridge/runtime_method.h:
+        * bridge/runtime_object.h:
+        * bridge/testqtbindings.cpp:
+        (Global::className):
+
 2011-08-09  Alexei Svitkine  <asvitkine@chromium.org>
 
         [Chromium] Enable rubber banding when scrolling.
index ce24a23..94f07ec 100644 (file)
@@ -36,6 +36,8 @@ namespace WebCore {
 
     class JSAudioConstructor : public DOMConstructorWithDocument {
     public:
+        typedef DOMConstructorWithDocument Base;
+
         static JSAudioConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
         {
             return new (JSC::allocateCell<JSAudioConstructor>(*exec->heap())) JSAudioConstructor(exec, structure, globalObject);
index 10206c3..2afd4e2 100644 (file)
@@ -27,6 +27,8 @@ namespace WebCore {
 
     class JSImageConstructor : public DOMConstructorWithDocument {
     public:
+        typedef DOMConstructorWithDocument Base;
+
         static JSImageConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
         {
             return new (JSC::allocateCell<JSImageConstructor>(*exec->heap())) JSImageConstructor(exec, structure, globalObject);
index 0b48eed..881f340 100644 (file)
@@ -28,6 +28,8 @@ namespace WebCore {
 
     class JSOptionConstructor : public DOMConstructorWithDocument {
     public:
+        typedef DOMConstructorWithDocument Base;
+
         static JSOptionConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
         {
             return new (JSC::allocateCell<JSOptionConstructor>(*exec->heap())) JSOptionConstructor(exec, structure, globalObject);
index b76d690..74f0d08 100644 (file)
@@ -697,10 +697,10 @@ sub GenerateHeader
 
     # Class declaration
     push(@headerContent, "class $className : public $parentClassName {\n");
-    push(@headerContent, "    typedef $parentClassName Base;\n");
 
     # Static create methods
     push(@headerContent, "public:\n");
+    push(@headerContent, "    typedef $parentClassName Base;\n");
     if ($interfaceName eq "DOMWindow") {
         push(@headerContent, "    static $className* create(JSC::JSGlobalData& globalData, JSC::Structure* structure, PassRefPtr<$implType> impl, JSDOMWindowShell* windowShell)\n");
         push(@headerContent, "    {\n");
@@ -995,8 +995,8 @@ sub GenerateHeader
     # Add prototype declaration.
     %structureFlags = ();
     push(@headerContent, "class ${className}Prototype : public JSC::JSObjectWithGlobalObject {\n");
-    push(@headerContent, "    typedef JSC::JSObjectWithGlobalObject Base;\n");
     push(@headerContent, "public:\n");
+    push(@headerContent, "    typedef JSC::JSObjectWithGlobalObject Base;\n");
     if ($interfaceName ne "DOMWindow" && !$dataNode->extendedAttributes->{"IsWorkerContext"}) {
         push(@headerContent, "    static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);\n");
     }
@@ -3066,6 +3066,7 @@ sub GenerateConstructorDeclaration
     push(@$outputArray, "    ${constructorClassName}(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);\n\n");
     
     push(@$outputArray, "public:\n");
+    push(@$outputArray, "    typedef DOMConstructorObject Base;\n");
     push(@$outputArray, "    static $constructorClassName* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)\n");
     push(@$outputArray, "    {\n");
     push(@$outputArray, "        return new (JSC::allocateCell<$constructorClassName>(*exec->heap())) $constructorClassName(exec, structure, globalObject);\n");
index 14f0973..6adccae 100644 (file)
@@ -67,6 +67,7 @@ private:
     JSTestInterfaceConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
 
 public:
+    typedef DOMConstructorObject Base;
     static JSTestInterfaceConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
     {
         return new (JSC::allocateCell<JSTestInterfaceConstructor>(*exec->heap())) JSTestInterfaceConstructor(exec, structure, globalObject);
index 02fb2fc..a1224bc 100644 (file)
@@ -32,8 +32,8 @@
 namespace WebCore {
 
 class JSTestInterface : public JSDOMWrapper {
-    typedef JSDOMWrapper Base;
 public:
+    typedef JSDOMWrapper Base;
     static JSTestInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestInterface> impl)
     {
         return new (JSC::allocateCell<JSTestInterface>(globalObject->globalData().heap)) JSTestInterface(structure, globalObject, impl);
@@ -63,8 +63,8 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface*);
 TestInterface* toTestInterface(JSC::JSValue);
 
 class JSTestInterfacePrototype : public JSC::JSObjectWithGlobalObject {
-    typedef JSC::JSObjectWithGlobalObject Base;
 public:
+    typedef JSC::JSObjectWithGlobalObject Base;
     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
     static JSTestInterfacePrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     {
index 3f058d6..db278c1 100644 (file)
@@ -68,6 +68,7 @@ private:
     JSTestMediaQueryListListenerConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
 
 public:
+    typedef DOMConstructorObject Base;
     static JSTestMediaQueryListListenerConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
     {
         return new (JSC::allocateCell<JSTestMediaQueryListListenerConstructor>(*exec->heap())) JSTestMediaQueryListListenerConstructor(exec, structure, globalObject);
index 1373a08..70cc75e 100644 (file)
@@ -30,8 +30,8 @@
 namespace WebCore {
 
 class JSTestMediaQueryListListener : public JSDOMWrapper {
-    typedef JSDOMWrapper Base;
 public:
+    typedef JSDOMWrapper Base;
     static JSTestMediaQueryListListener* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestMediaQueryListListener> impl)
     {
         return new (JSC::allocateCell<JSTestMediaQueryListListener>(globalObject->globalData().heap)) JSTestMediaQueryListListener(structure, globalObject, impl);
@@ -61,8 +61,8 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListene
 TestMediaQueryListListener* toTestMediaQueryListListener(JSC::JSValue);
 
 class JSTestMediaQueryListListenerPrototype : public JSC::JSObjectWithGlobalObject {
-    typedef JSC::JSObjectWithGlobalObject Base;
 public:
+    typedef JSC::JSObjectWithGlobalObject Base;
     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
     static JSTestMediaQueryListListenerPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     {
index 4246f8f..ffd23a8 100644 (file)
@@ -147,6 +147,7 @@ private:
     JSTestObjConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
 
 public:
+    typedef DOMConstructorObject Base;
     static JSTestObjConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
     {
         return new (JSC::allocateCell<JSTestObjConstructor>(*exec->heap())) JSTestObjConstructor(exec, structure, globalObject);
index 89292e2..a104449 100644 (file)
@@ -30,8 +30,8 @@
 namespace WebCore {
 
 class JSTestObj : public JSDOMWrapper {
-    typedef JSDOMWrapper Base;
 public:
+    typedef JSDOMWrapper Base;
     static JSTestObj* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestObj> impl)
     {
         return new (JSC::allocateCell<JSTestObj>(globalObject->globalData().heap)) JSTestObj(structure, globalObject, impl);
@@ -70,8 +70,8 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
 TestObj* toTestObj(JSC::JSValue);
 
 class JSTestObjPrototype : public JSC::JSObjectWithGlobalObject {
-    typedef JSC::JSObjectWithGlobalObject Base;
 public:
+    typedef JSC::JSObjectWithGlobalObject Base;
     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
     static JSTestObjPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     {
index 1363515..dd2e243 100644 (file)
@@ -69,6 +69,7 @@ private:
     JSTestSerializedScriptValueInterfaceConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
 
 public:
+    typedef DOMConstructorObject Base;
     static JSTestSerializedScriptValueInterfaceConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
     {
         return new (JSC::allocateCell<JSTestSerializedScriptValueInterfaceConstructor>(*exec->heap())) JSTestSerializedScriptValueInterfaceConstructor(exec, structure, globalObject);
index 32d98a6..62400de 100644 (file)
@@ -32,8 +32,8 @@
 namespace WebCore {
 
 class JSTestSerializedScriptValueInterface : public JSDOMWrapper {
-    typedef JSDOMWrapper Base;
 public:
+    typedef JSDOMWrapper Base;
     static JSTestSerializedScriptValueInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestSerializedScriptValueInterface> impl)
     {
         return new (JSC::allocateCell<JSTestSerializedScriptValueInterface>(globalObject->globalData().heap)) JSTestSerializedScriptValueInterface(structure, globalObject, impl);
@@ -63,8 +63,8 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValue
 TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue);
 
 class JSTestSerializedScriptValueInterfacePrototype : public JSC::JSObjectWithGlobalObject {
-    typedef JSC::JSObjectWithGlobalObject Base;
 public:
+    typedef JSC::JSObjectWithGlobalObject Base;
     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
     static JSTestSerializedScriptValueInterfacePrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     {
index a25115e..fbfb5be 100644 (file)
@@ -37,6 +37,8 @@ class CInstance;
 
 class CRuntimeObject : public RuntimeObject {
 public:
+    typedef RuntimeObject Base;
+
     static CRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<CInstance> instance)
     {
         return new (allocateCell<CRuntimeObject>(*exec->heap())) CRuntimeObject(exec, globalObject, instance);
index 8a7a846..d2280c5 100644 (file)
@@ -111,6 +111,8 @@ bool CInstance::supportsInvokeDefaultMethod() const
 
 class CRuntimeMethod : public RuntimeMethod {
 public:
+    typedef RuntimeMethod Base;
+
     static CRuntimeMethod* create(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, Bindings::MethodList& list)
     {
         return new (allocateCell<CRuntimeMethod>(*exec->heap())) CRuntimeMethod(exec, globalObject, name, list);
index b5ecd93..5a9edbb 100644 (file)
@@ -116,6 +116,8 @@ JSValue JavaInstance::booleanValue() const
 
 class JavaRuntimeMethod : public RuntimeMethod {
 public:
+    typedef RuntimeMethod Base;
+
     static JavaRuntimeMethod* create(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, Bindings::MethodList& list)
     {
         return new (allocateCell<JavaRuntimeMethod>(*exec->heap())) JavaRuntimeMethod(exec, globalObject, name, list);
index 4195290..0f307cb 100644 (file)
@@ -35,6 +35,8 @@ class JavaInstance;
 
 class JavaRuntimeObject : public RuntimeObject {
 public:
+    typedef RuntimeObject Base;
+
     static JavaRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<JavaInstance> javaInst)
     {
         return new (allocateCell<JavaRuntimeObject>(*exec->heap())) JavaRuntimeObject(exec, globalObject, javaInst);
index 388cf86..69fac38 100644 (file)
@@ -35,6 +35,8 @@ class ObjcInstance;
 
 class ObjCRuntimeObject : public RuntimeObject {
 public:
+    typedef RuntimeObject Base;
+
     static ObjCRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<ObjcInstance> inst)
     {
         return new (allocateCell<ObjCRuntimeObject>(*exec->heap())) ObjCRuntimeObject(exec, globalObject, inst);
index 076aca6..574c3c7 100644 (file)
@@ -92,6 +92,8 @@ private:
 
 class ObjcFallbackObjectImp : public JSObjectWithGlobalObject {
 public:
+    typedef JSObjectWithGlobalObject Base;
+
     static ObjcFallbackObjectImp* create(ExecState* exec, JSGlobalObject* globalObject, ObjcInstance* instance, const Identifier& propertyName)
     {
         return new (allocateCell<ObjcFallbackObjectImp>(*exec->heap())) ObjcFallbackObjectImp(exec, globalObject, instance, propertyName);
index 0e862cb..a9ca480 100644 (file)
@@ -50,6 +50,8 @@ Q_GLOBAL_STATIC(QtInstance::QtSenderStack, senderStack)
 // Derived RuntimeObject
 class QtRuntimeObject : public RuntimeObject {
 public:
+    typedef RuntimeObject Base;
+
     static QtRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<Instance> instance)
     {
         return new (allocateCell<QtRuntimeObject>(*exec->heap())) QtRuntimeObject(exec, globalObject, instance);
index 669cf33..378e6c3 100644 (file)
@@ -198,6 +198,8 @@ struct QtPixmapMetaData {
 // Derived RuntimeObject
 class QtPixmapRuntimeObject : public RuntimeObject {
 public:
+    typedef RuntimeObject Base;
+
     static QtPixmapRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<Instance> instance)
     {
         return new (allocateCell<QtPixmapRuntimeObject>(*exec->heap())) QtPixmapRuntimeObject(exec, globalObject, instance);
index 6f332de..2be42f4 100644 (file)
@@ -125,6 +125,8 @@ class QtRuntimeConnectionMethodData : public QtRuntimeMethodData {
 // Common base class (doesn't really do anything interesting)
 class QtRuntimeMethod : public InternalFunction {
 public:
+    typedef InternalFunction Base;
+
     virtual ~QtRuntimeMethod();
 
     static const ClassInfo s_info;
@@ -150,6 +152,8 @@ protected:
 class QtRuntimeMetaMethod : public QtRuntimeMethod
 {
 public:
+    typedef QtRuntimeMethod Base;
+
     static QtRuntimeMetaMethod* create(ExecState* exec, const Identifier& n, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature, bool allowPrivate)
     {
         return new (allocateCell<QtRuntimeMetaMethod>(*exec->heap())) QtRuntimeMetaMethod(exec, n, inst, index, signature, allowPrivate);
@@ -175,9 +179,10 @@ private:
 };
 
 class QtConnectionObject;
-class QtRuntimeConnectionMethod : public QtRuntimeMethod
-{
+class QtRuntimeConnectionMethod : public QtRuntimeMethod {
 public:
+    typedef QtRuntimeMethod Base;
+
     static QtRuntimeConnectionMethod* create(ExecState* exec, const Identifier& n, bool isConnect, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature)
     {
         return new (allocateCell<QtRuntimeConnectionMethod>(*exec->heap())) QtRuntimeConnectionMethod(exec, n, isConnect, inst, index, signature);
index 668a156..25728fb 100644 (file)
@@ -33,6 +33,8 @@ namespace JSC {
     
 class RuntimeArray : public JSArray {
 public:
+    typedef JSArray Base;
+
     static RuntimeArray* create(ExecState* exec, Bindings::Array* array)
     {
         return new (allocateCell<RuntimeArray>(*exec->heap())) RuntimeArray(exec, array);
index fe0e32b..c6c3e4e 100644 (file)
@@ -35,6 +35,8 @@ namespace JSC {
 
 class RuntimeMethod : public InternalFunction {
 public:
+    typedef InternalFunction Base;
+
     static RuntimeMethod* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& methodList)
     {
         return new (allocateCell<RuntimeMethod>(*exec->heap())) RuntimeMethod(exec, globalObject, structure, name, methodList);
index e82f82f..8622e31 100644 (file)
@@ -35,6 +35,8 @@ namespace Bindings {
 
 class RuntimeObject : public JSObjectWithGlobalObject {
 public:
+    typedef JSObjectWithGlobalObject Base;
+
     static RuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<Instance> instance)
     {
         return new (allocateCell<RuntimeObject>(*exec->heap())) RuntimeObject(exec, globalObject, structure, instance);
index 20bf88a..71fc9bb 100644 (file)
@@ -76,7 +76,9 @@ using namespace JSC::Bindings;
 
 class Global : public JSNonFinalObject {
 public:
-  virtual UString className() const { return "global"; }
+    typedef JSNonFinalObject Base;
+
+    virtual UString className() const { return "global"; }
 };
 
 static char code[] =
index c4cf144..5bdecf2 100644 (file)
@@ -1,3 +1,17 @@
+2011-08-09  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        Add ParentClass typedef in all JSC classes
+        https://bugs.webkit.org/show_bug.cgi?id=65731
+
+        Reviewed by Oliver Hunt.
+
+        Just added the Base typedefs in all the classes that are a subclass of JSCell 
+        to point at their parent classes.  This is a change to support future changes to the way
+        constructors and destructors are implemented in JS objects, among other things.
+
+        * Plugins/Hosted/ProxyInstance.mm:
+        * Plugins/Hosted/ProxyRuntimeObject.h:
+
 2011-08-08  Chris Marrin  <cmarrin@apple.com>
 
         Logic to compute visible display rect in GraphicsLayerCA::syncCompositingState
index 09989ca..b0acca1 100644 (file)
@@ -179,6 +179,8 @@ JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id
 
 class ProxyRuntimeMethod : public RuntimeMethod {
 public:
+    typedef RuntimeMethod Base;
+
     static ProxyRuntimeMethod* create(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, Bindings::MethodList& list)
     {
         return new (allocateCell<ProxyRuntimeMethod>(*exec->heap())) ProxyRuntimeMethod(exec, globalObject, name, list);
index f70b66a..a79160d 100644 (file)
@@ -36,6 +36,8 @@ class ProxyInstance;
 
 class ProxyRuntimeObject : public JSC::Bindings::RuntimeObject {
 public:
+    typedef JSC::Bindings::RuntimeObject Base;
+
     static ProxyRuntimeObject* create(JSC::ExecState* exec, JSC::JSGlobalObject* globalObject, PassRefPtr<ProxyInstance> instance)
     {
         return new (JSC::allocateCell<ProxyRuntimeObject>(*exec->heap())) ProxyRuntimeObject(exec, globalObject, instance);
index bc6bf5d..1fd2cec 100644 (file)
@@ -1,3 +1,17 @@
+2011-08-09  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        Add ParentClass typedef in all JSC classes
+        https://bugs.webkit.org/show_bug.cgi?id=65731
+
+        Reviewed by Oliver Hunt.
+
+        Just added the Base typedefs in all the classes that are a subclass of JSCell 
+        to point at their parent classes.  This is a change to support future changes to the way
+        constructors and destructors are implemented in JS objects, among other things.
+
+        * WebProcess/Plugins/Netscape/JSNPMethod.h:
+        * WebProcess/Plugins/Netscape/JSNPObject.h:
+
 2011-08-08  Adrienne Walker  <enne@google.com>
 
         Add testing for --force-compositing-mode to windows.internal
index ecefb16..7c0db98 100644 (file)
@@ -35,6 +35,8 @@ namespace WebKit {
 // A JSObject that wraps an NPMethod.
 class JSNPMethod : public JSC::InternalFunction {
 public:
+    typedef JSC::InternalFunction Base;
+
     static JSNPMethod* create(JSC::ExecState* exec, JSC::JSGlobalObject* globalObject, const JSC::Identifier& ident, NPIdentifier npIdent)
     {
         return new (JSC::allocateCell<JSNPMethod>(*exec->heap())) JSNPMethod(exec, globalObject, ident, npIdent);
index abd1d35..af91da8 100644 (file)
@@ -39,6 +39,8 @@ class NPRuntimeObjectMap;
 
 class JSNPObject : public JSC::JSObjectWithGlobalObject {
 public:
+    typedef JSC::JSObjectWithGlobalObject Base;
+
     static JSNPObject* create(JSC::JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject)
     {
         return new (JSC::allocateCell<JSNPObject>(globalObject->globalData().heap)) JSNPObject(globalObject, objectMap, npObject);