Ignore:
Timestamp:
Aug 9, 2011, 1:46:17 PM (14 years ago)
Author:
[email protected]
Message:

Add ParentClass typedef in all JSC classes
https://bugs.webkit.org/show_bug.cgi?id=65731

Patch by Mark Hahnenberg <[email protected]> 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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/Executable.h

    r92250 r92706  
    5454        static const int NUM_PARAMETERS_NOT_COMPILED = -1;
    5555
    56     protected:
    5756        ExecutableBase(JSGlobalData& globalData, Structure* structure, int numParameters)
    5857            : JSCell(globalData, structure)
     
    6766       
    6867    public:
     68        typedef JSCell Base;
     69
    6970        static ExecutableBase* create(JSGlobalData& globalData, Structure* structure, int numParameters)
    7071        {
     
    169170        friend class JIT;
    170171    public:
     172        typedef ExecutableBase Base;
     173
    171174#if ENABLE(JIT)
    172175        static NativeExecutable* create(JSGlobalData& globalData, MacroAssemblerCodePtr callThunk, NativeFunction function, MacroAssemblerCodePtr constructThunk, NativeFunction constructor)
     
    220223    class ScriptExecutable : public ExecutableBase {
    221224    public:
     225        typedef ExecutableBase Base;
     226
    222227        ScriptExecutable(Structure* structure, JSGlobalData& globalData, const SourceCode& source, bool isInStrictContext)
    223228            : ExecutableBase(globalData, structure, NUM_PARAMETERS_NOT_COMPILED)
     
    278283    class EvalExecutable : public ScriptExecutable {
    279284    public:
     285        typedef ScriptExecutable Base;
    280286
    281287        ~EvalExecutable();
     
    327333    class ProgramExecutable : public ScriptExecutable {
    328334    public:
     335        typedef ScriptExecutable Base;
     336
    329337        static ProgramExecutable* create(ExecState* exec, const SourceCode& source)
    330338        {
     
    380388        friend class JIT;
    381389    public:
     390        typedef ScriptExecutable Base;
     391
    382392        static FunctionExecutable* create(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, bool isInStrictContext, int firstLine, int lastLine)
    383393        {
Note: See TracChangeset for help on using the changeset viewer.