Skip to content
  • ggaren's avatar
    Reviewed by Darin. · 20c233d3
    ggaren authored
            Improved type safety by implementing opaque JSValue/JSObject typing through 
            abuse of 'const', not void*. Also fixed an alarming number of bugs
            exposed by this new type safety.
            
            I made one design change in JavaScriptCore, which is that the JSObject
            constructor should take a JSValue* as its prototype argument, not a JSObject*,
            since we allow the prototype to be any JSValue*, including jsNull(), for
            example.
            
            * API/APICast.h:
            (toJS):
            * API/JSBase.h:
            * API/JSCallbackConstructor.cpp:
            (KJS::JSCallbackConstructor::construct):
            * API/JSCallbackFunction.cpp:
            (KJS::JSCallbackFunction::callAsFunction):
            * API/JSCallbackObject.cpp:
            (KJS::JSCallbackObject::JSCallbackObject):
            (KJS::JSCallbackObject::getOwnPropertySlot):
            (KJS::JSCallbackObject::put):
            (KJS::JSCallbackObject::construct):
            (KJS::JSCallbackObject::callAsFunction):
            (KJS::JSCallbackObject::staticFunctionGetter):
            * API/JSCallbackObject.h:
            * API/JSContextRef.cpp:
            (JSEvaluate):
            * API/JSNode.c:
            (JSNodePrototype_appendChild):
            (JSNodePrototype_removeChild):
            (JSNodePrototype_replaceChild):
            * API/JSObjectRef.cpp:
            (JSObjectMake):
            (JSFunctionMakeWithBody):
            (JSObjectGetProperty):
            (JSObjectCallAsFunction):
            (JSObjectCallAsConstructor):
            * API/JSObjectRef.h:
            * API/testapi.c:
            (main):
            * ChangeLog:
            * kjs/object.h:
            (KJS::JSObject::JSObject):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    20c233d3