Add ParentClass typedef in all JSC classes
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: http://svn.webkit.org/repository/webkit/trunk@92706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/runtime/Structure.h b/Source/JavaScriptCore/runtime/Structure.h
index e6a2038..efc75c4 100644
--- a/Source/JavaScriptCore/runtime/Structure.h
+++ b/Source/JavaScriptCore/runtime/Structure.h
@@ -59,6 +59,9 @@
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);