Changeset 27207 in webkit for trunk/JavaScriptCore/API/testapi.c


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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.