Changeset 27207 in webkit for trunk/JavaScriptCore/API/testapi.c
- Timestamp:
- Oct 28, 2007, 9:31:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/testapi.c
r26688 r27207 142 142 UNUSED_PARAM(object); 143 143 UNUSED_PARAM(value); 144 UNUSED_PARAM(exception); 144 145 145 146 if (JSStringIsEqualToUTF8CString(propertyName, "cantSet")) … … 168 169 { 169 170 UNUSED_PARAM(context); 171 UNUSED_PARAM(object); 170 172 171 173 JSStringRef propertyName; … … 185 187 UNUSED_PARAM(object); 186 188 UNUSED_PARAM(thisObject); 189 UNUSED_PARAM(exception); 187 190 188 191 if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(context, 0))) … … 198 201 199 202 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); 203 206 } 204 207 … … 206 209 { 207 210 UNUSED_PARAM(context); 211 UNUSED_PARAM(constructor); 208 212 209 213 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); 211 215 JSStringRelease(numberString); 212 216 213 return JSValueIsInstanceOfConstructor(context, possibleValue, numberConstructor, NULL);217 return JSValueIsInstanceOfConstructor(context, possibleValue, numberConstructor, exception); 214 218 } 215 219 216 220 static JSValueRef MyObject_convertToType(JSContextRef context, JSObjectRef object, JSType type, JSValueRef* exception) 217 221 { 218 UNUSED_PARAM( context);219 UNUSED_PARAM( object);222 UNUSED_PARAM(object); 223 UNUSED_PARAM(exception); 220 224 221 225 switch (type) { … … 265 269 static JSClassRef MyObject_class(JSContextRef context) 266 270 { 271 UNUSED_PARAM(context); 272 267 273 static JSClassRef jsClass; 268 274 if (!jsClass) … … 274 280 static JSValueRef Base_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) 275 281 { 276 UNUSED_PARAM(ctx);277 282 UNUSED_PARAM(object); 278 283 UNUSED_PARAM(propertyName); 284 UNUSED_PARAM(exception); 279 285 280 286 return JSValueMakeNumber(ctx, 1); // distinguish base get form derived get … … 283 289 static bool Base_set(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) 284 290 { 285 UNUSED_PARAM(ctx);286 291 UNUSED_PARAM(object); 287 292 UNUSED_PARAM(propertyName); … … 294 299 static JSValueRef Base_callAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 295 300 { 296 UNUSED_PARAM(ctx);297 301 UNUSED_PARAM(function); 298 302 UNUSED_PARAM(thisObject); 299 303 UNUSED_PARAM(argumentCount); 300 304 UNUSED_PARAM(arguments); 305 UNUSED_PARAM(exception); 301 306 302 307 return JSValueMakeNumber(ctx, 1); // distinguish base call from derived call … … 318 323 static void Base_initialize(JSContextRef context, JSObjectRef object) 319 324 { 325 UNUSED_PARAM(context); 326 320 327 if (TestInitializeFinalize) { 321 328 ASSERT((void*)1 == JSObjectGetPrivate(object)); … … 335 342 static JSClassRef Base_class(JSContextRef context) 336 343 { 344 UNUSED_PARAM(context); 345 337 346 static JSClassRef jsClass; 338 347 if (!jsClass) { … … 349 358 static JSValueRef Derived_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) 350 359 { 351 UNUSED_PARAM(ctx);352 360 UNUSED_PARAM(object); 353 361 UNUSED_PARAM(propertyName); 362 UNUSED_PARAM(exception); 354 363 355 364 return JSValueMakeNumber(ctx, 2); // distinguish base get form derived get … … 369 378 static JSValueRef Derived_callAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 370 379 { 371 UNUSED_PARAM(ctx);372 380 UNUSED_PARAM(function); 373 381 UNUSED_PARAM(thisObject); 374 382 UNUSED_PARAM(argumentCount); 375 383 UNUSED_PARAM(arguments); 384 UNUSED_PARAM(exception); 376 385 377 386 return JSValueMakeNumber(ctx, 2); // distinguish base call from derived call … … 394 403 static void Derived_initialize(JSContextRef context, JSObjectRef object) 395 404 { 405 UNUSED_PARAM(context); 406 396 407 if (TestInitializeFinalize) { 397 408 ASSERT((void*)2 == JSObjectGetPrivate(object)); … … 427 438 UNUSED_PARAM(functionObject); 428 439 UNUSED_PARAM(thisObject); 440 UNUSED_PARAM(exception); 429 441 430 442 if (argumentCount > 0) { … … 443 455 { 444 456 UNUSED_PARAM(constructorObject); 457 UNUSED_PARAM(exception); 445 458 446 459 JSObjectRef result = JSObjectMake(context, NULL, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.