Changeset 27207 in webkit for trunk/JavaScriptCore/API


Ignore:
Timestamp:
Oct 28, 2007, 9:31:54 PM (18 years ago)
Author:
darin
Message:

Reviewed by Adam.

  • turn on unused parameter waring on Mac OS X because it's already on elsewhere
  • Configurations/Base.xcconfig: Took out -wno-unused-parameter.
  • API/JSNode.c:
  • API/JSNodeList.c:
  • API/minidom.c:
  • API/testapi.c: Fixed unused variables by using them or marked them with UNUSED_PARAM.
  • kjs/CollectorHeapIntrospector.h: (KJS::CollectorHeapIntrospector::zoneCalloc): Removed parameter names to indicate they are unused.
Location:
trunk/JavaScriptCore/API
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSNode.c

    r26688 r27207  
    6666            if (JSValueIsObjectOfClass(context, arguments[0], JSNode_class(context))) {
    6767                Node* node = JSObjectGetPrivate(thisObject);
    68                 Node* child = JSObjectGetPrivate(JSValueToObject(context, arguments[0], NULL));
     68                Node* child = JSObjectGetPrivate(JSValueToObject(context, arguments[0], exception));
    6969               
    7070                Node_removeChild(node, child);
     
    8686                if (JSValueIsObjectOfClass(context, arguments[1], JSNode_class(context))) {
    8787                    Node* node = JSObjectGetPrivate(thisObject);
    88                     Node* newChild = JSObjectGetPrivate(JSValueToObject(context, arguments[0], NULL));
    89                     Node* oldChild = JSObjectGetPrivate(JSValueToObject(context, arguments[1], NULL));
     88                    Node* newChild = JSObjectGetPrivate(JSValueToObject(context, arguments[0], exception));
     89                    Node* oldChild = JSObjectGetPrivate(JSValueToObject(context, arguments[1], exception));
    9090                   
    9191                    Node_replaceChild(node, newChild, oldChild);
     
    109109    UNUSED_PARAM(context);
    110110    UNUSED_PARAM(propertyName);
     111    UNUSED_PARAM(exception);
    111112
    112113    Node* node = JSObjectGetPrivate(object);
     
    124125{
    125126    UNUSED_PARAM(propertyName);
     127    UNUSED_PARAM(exception);
     128
    126129    Node* node = JSObjectGetPrivate(thisObject);
    127130    ASSERT(node);
     
    134137    UNUSED_PARAM(propertyName);
    135138    UNUSED_PARAM(object);
     139    UNUSED_PARAM(exception);
    136140   
    137141    return JSValueMakeUndefined(context);
     
    147151static void JSNode_initialize(JSContextRef context, JSObjectRef object)
    148152{
     153    UNUSED_PARAM(context);
     154
    149155    Node* node = JSObjectGetPrivate(object);
    150156    ASSERT(node);
     
    163169JSClassRef JSNode_class(JSContextRef context)
    164170{
     171    UNUSED_PARAM(context);
     172
    165173    static JSClassRef jsClass;
    166174    if (!jsClass) {
     
    186194    UNUSED_PARAM(argumentCount);
    187195    UNUSED_PARAM(arguments);
     196    UNUSED_PARAM(exception);
    188197
    189198    return JSNode_new(context, Node_new());
  • trunk/JavaScriptCore/API/JSNodeList.c

    r26688 r27207  
    3232static JSValueRef JSNodeList_item(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    3333{
     34    UNUSED_PARAM(object);
     35
    3436    if (argumentCount > 0) {
    3537        NodeList* nodeList = JSObjectGetPrivate(thisObject);
     
    5153{
    5254    UNUSED_PARAM(context);
     55    UNUSED_PARAM(propertyName);
     56    UNUSED_PARAM(exception);
    5357   
    5458    NodeList* nodeList = JSObjectGetPrivate(thisObject);
     
    7983static void JSNodeList_initialize(JSContextRef context, JSObjectRef thisObject)
    8084{
     85    UNUSED_PARAM(context);
     86
    8187    NodeList* nodeList = JSObjectGetPrivate(thisObject);
    8288    ASSERT(nodeList);
     
    95101static JSClassRef JSNodeList_class(JSContextRef context)
    96102{
     103    UNUSED_PARAM(context);
     104
    97105    static JSClassRef jsClass;
    98106    if (!jsClass) {
  • trunk/JavaScriptCore/API/minidom.c

    r26688 r27207  
    7474static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    7575{
     76    UNUSED_PARAM(object);
     77    UNUSED_PARAM(thisObject);
     78
    7679    if (argumentCount > 0) {
    77         JSStringRef string = JSValueToStringCopy(context, arguments[0], NULL);
     80        JSStringRef string = JSValueToStringCopy(context, arguments[0], exception);
    7881        size_t numChars = JSStringGetMaximumUTF8CStringSize(string);
    7982        char stringUTF8[numChars];
  • trunk/JavaScriptCore/API/testapi.c

    r26688 r27207  
    142142    UNUSED_PARAM(object);
    143143    UNUSED_PARAM(value);
     144    UNUSED_PARAM(exception);
    144145
    145146    if (JSStringIsEqualToUTF8CString(propertyName, "cantSet"))
     
    168169{
    169170    UNUSED_PARAM(context);
     171    UNUSED_PARAM(object);
    170172   
    171173    JSStringRef propertyName;
     
    185187    UNUSED_PARAM(object);
    186188    UNUSED_PARAM(thisObject);
     189    UNUSED_PARAM(exception);
    187190
    188191    if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(context, 0)))
     
    198201
    199202    if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(context, 0)))
    200         return JSValueToObject(context, JSValueMakeNumber(context, 1), NULL);
    201    
    202     return JSValueToObject(context, JSValueMakeNumber(context, 0), NULL);
     203        return JSValueToObject(context, JSValueMakeNumber(context, 1), exception);
     204   
     205    return JSValueToObject(context, JSValueMakeNumber(context, 0), exception);
    203206}
    204207
     
    206209{
    207210    UNUSED_PARAM(context);
     211    UNUSED_PARAM(constructor);
    208212
    209213    JSStringRef numberString = JSStringCreateWithUTF8CString("Number");
    210     JSObjectRef numberConstructor = JSValueToObject(context, JSObjectGetProperty(context, JSContextGetGlobalObject(context), numberString, NULL), NULL);
     214    JSObjectRef numberConstructor = JSValueToObject(context, JSObjectGetProperty(context, JSContextGetGlobalObject(context), numberString, exception), exception);
    211215    JSStringRelease(numberString);
    212216
    213     return JSValueIsInstanceOfConstructor(context, possibleValue, numberConstructor, NULL);
     217    return JSValueIsInstanceOfConstructor(context, possibleValue, numberConstructor, exception);
    214218}
    215219
    216220static JSValueRef MyObject_convertToType(JSContextRef context, JSObjectRef object, JSType type, JSValueRef* exception)
    217221{
    218     UNUSED_PARAM(context);
    219     UNUSED_PARAM(object);
     222    UNUSED_PARAM(object);
     223    UNUSED_PARAM(exception);
    220224   
    221225    switch (type) {
     
    265269static JSClassRef MyObject_class(JSContextRef context)
    266270{
     271    UNUSED_PARAM(context);
     272
    267273    static JSClassRef jsClass;
    268274    if (!jsClass)
     
    274280static JSValueRef Base_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
    275281{
    276     UNUSED_PARAM(ctx);
    277282    UNUSED_PARAM(object);
    278283    UNUSED_PARAM(propertyName);
     284    UNUSED_PARAM(exception);
    279285
    280286    return JSValueMakeNumber(ctx, 1); // distinguish base get form derived get
     
    283289static bool Base_set(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
    284290{
    285     UNUSED_PARAM(ctx);
    286291    UNUSED_PARAM(object);
    287292    UNUSED_PARAM(propertyName);
     
    294299static JSValueRef Base_callAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    295300{
    296     UNUSED_PARAM(ctx);
    297301    UNUSED_PARAM(function);
    298302    UNUSED_PARAM(thisObject);
    299303    UNUSED_PARAM(argumentCount);
    300304    UNUSED_PARAM(arguments);
     305    UNUSED_PARAM(exception);
    301306   
    302307    return JSValueMakeNumber(ctx, 1); // distinguish base call from derived call
     
    318323static void Base_initialize(JSContextRef context, JSObjectRef object)
    319324{
     325    UNUSED_PARAM(context);
     326
    320327    if (TestInitializeFinalize) {
    321328        ASSERT((void*)1 == JSObjectGetPrivate(object));
     
    335342static JSClassRef Base_class(JSContextRef context)
    336343{
     344    UNUSED_PARAM(context);
     345
    337346    static JSClassRef jsClass;
    338347    if (!jsClass) {
     
    349358static JSValueRef Derived_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
    350359{
    351     UNUSED_PARAM(ctx);
    352360    UNUSED_PARAM(object);
    353361    UNUSED_PARAM(propertyName);
     362    UNUSED_PARAM(exception);
    354363
    355364    return JSValueMakeNumber(ctx, 2); // distinguish base get form derived get
     
    369378static JSValueRef Derived_callAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    370379{
    371     UNUSED_PARAM(ctx);
    372380    UNUSED_PARAM(function);
    373381    UNUSED_PARAM(thisObject);
    374382    UNUSED_PARAM(argumentCount);
    375383    UNUSED_PARAM(arguments);
     384    UNUSED_PARAM(exception);
    376385   
    377386    return JSValueMakeNumber(ctx, 2); // distinguish base call from derived call
     
    394403static void Derived_initialize(JSContextRef context, JSObjectRef object)
    395404{
     405    UNUSED_PARAM(context);
     406
    396407    if (TestInitializeFinalize) {
    397408        ASSERT((void*)2 == JSObjectGetPrivate(object));
     
    427438    UNUSED_PARAM(functionObject);
    428439    UNUSED_PARAM(thisObject);
     440    UNUSED_PARAM(exception);
    429441   
    430442    if (argumentCount > 0) {
     
    443455{
    444456    UNUSED_PARAM(constructorObject);
     457    UNUSED_PARAM(exception);
    445458   
    446459    JSObjectRef result = JSObjectMake(context, NULL, NULL);
Note: See TracChangeset for help on using the changeset viewer.