Changeset 15484 in webkit for trunk/JavaScriptCore/API/testapi.c
- Timestamp:
- Jul 17, 2006, 3:49:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/testapi.c
r15483 r15484 101 101 102 102 static bool didInitialize = false; 103 static void MyObject_initialize(JSContextRef context, JSObjectRef object , JSValueRef* exception)103 static void MyObject_initialize(JSContextRef context, JSObjectRef object) 104 104 { 105 105 UNUSED_PARAM(context); … … 291 291 } 292 292 293 static void Base_initialize(JSContextRef context, JSObjectRef object , JSValueRef* exception)293 static void Base_initialize(JSContextRef context, JSObjectRef object) 294 294 { 295 295 assert(!JSObjectGetPrivate(object)); … … 316 316 } 317 317 318 static void Derived_initialize(JSContextRef context, JSObjectRef object , JSValueRef* exception)318 static void Derived_initialize(JSContextRef context, JSObjectRef object) 319 319 { 320 320 assert((void*)1 == JSObjectGetPrivate(object)); … … 362 362 UNUSED_PARAM(constructorObject); 363 363 364 JSObjectRef result = JSObjectMake(context, NULL, 0,NULL);364 JSObjectRef result = JSObjectMake(context, NULL, NULL); 365 365 if (argumentCount > 0) { 366 366 JSStringRef value = JSStringCreateWithUTF8CString("value"); … … 391 391 JSValueRef jsOne = JSValueMakeNumber(context, 1); 392 392 JSValueRef jsOneThird = JSValueMakeNumber(context, 1.0 / 3.0); 393 JSObjectRef jsObjectNoProto = JSObjectMake(context, NULL, JSValueMakeNull(context) , NULL);393 JSObjectRef jsObjectNoProto = JSObjectMake(context, NULL, JSValueMakeNull(context)); 394 394 395 395 // FIXME: test funny utf8 characters … … 445 445 #endif // __APPLE__ 446 446 447 JSObjectRef myObject = JSObjectMake(context, MyObject_class(context), NULL , NULL);447 JSObjectRef myObject = JSObjectMake(context, MyObject_class(context), NULL); 448 448 assert(didInitialize); 449 449 JSStringRef myObjectIString = JSStringCreateWithUTF8CString("MyObject"); … … 559 559 #endif // __APPLE__ 560 560 561 jsGlobalValue = JSObjectMake(context, NULL, NULL , NULL);561 jsGlobalValue = JSObjectMake(context, NULL, NULL); 562 562 JSValueProtect(context, jsGlobalValue); 563 563 JSGarbageCollect(context); … … 667 667 assert(!JSObjectGetPrivate(myConstructor)); 668 668 669 o = JSObjectMake(context, NULL, NULL , NULL);669 o = JSObjectMake(context, NULL, NULL); 670 670 JSObjectSetProperty(context, o, jsOneIString, JSValueMakeNumber(context, 1), kJSPropertyAttributeNone, NULL); 671 671 JSObjectSetProperty(context, o, jsCFIString, JSValueMakeNumber(context, 1), kJSPropertyAttributeDontEnum, NULL); … … 690 690 assert(JSValueIsEqual(context, v, o, NULL)); 691 691 692 exception = NULL; 693 o = JSObjectMake(context, Derived_class(context), NULL, &exception); 694 assert(!exception); 692 o = JSObjectMake(context, Derived_class(context), NULL); 695 693 assert(JSObjectGetPrivate(o) == (void*)2); 696 694 o = NULL; … … 713 711 714 712 // Allocate a few dummies so that at least one will be collected 715 JSObjectMake(context, MyObject_class(context), NULL , NULL);716 JSObjectMake(context, MyObject_class(context), NULL , NULL);713 JSObjectMake(context, MyObject_class(context), NULL); 714 JSObjectMake(context, MyObject_class(context), NULL); 717 715 JSGarbageCollect(context); 718 716 assert(MyObject_didFinalize);
Note:
See TracChangeset
for help on using the changeset viewer.