Changeset 41931 in webkit for trunk/JavaScriptCore
- Timestamp:
- Mar 23, 2009, 6:59:32 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
r41905 r41931 100 100 { 101 101 UString thisClassName = classRef()->className(); 102 if (!thisClassName.is Null())102 if (!thisClassName.isEmpty()) 103 103 return thisClassName; 104 104 -
trunk/JavaScriptCore/API/tests/testapi.c
r41924 r41931 413 413 } 414 414 415 JSClassDefinition EmptyObject_definition = { 416 0, 417 kJSClassAttributeNone, 418 419 NULL, 420 NULL, 421 422 NULL, 423 NULL, 424 425 NULL, 426 NULL, 427 NULL, 428 NULL, 429 NULL, 430 NULL, 431 NULL, 432 NULL, 433 NULL, 434 NULL, 435 NULL, 436 }; 437 438 static JSClassRef EmptyObject_class(JSContextRef context) 439 { 440 UNUSED_PARAM(context); 441 442 static JSClassRef jsClass; 443 if (!jsClass) 444 jsClass = JSClassCreate(&EmptyObject_definition); 445 446 return jsClass; 447 } 448 415 449 416 450 static JSValueRef Base_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) … … 777 811 JSObjectSetProperty(context, globalObject, EvilExceptionObjectIString, EvilExceptionObject, kJSPropertyAttributeNone, NULL); 778 812 JSStringRelease(EvilExceptionObjectIString); 813 814 JSObjectRef EmptyObject = JSObjectMake(context, EmptyObject_class(context), NULL); 815 JSStringRef EmptyObjectIString = JSStringCreateWithUTF8CString("EmptyObject"); 816 JSObjectSetProperty(context, globalObject, EmptyObjectIString, EmptyObject, kJSPropertyAttributeNone, NULL); 817 JSStringRelease(EmptyObjectIString); 779 818 780 819 JSValueRef exception; -
trunk/JavaScriptCore/API/tests/testapi.js
r41905 r41931 163 163 shouldThrow("String(EvilExceptionObject)"); 164 164 165 shouldBe("EmptyObject", "[object CallbackObject]"); 165 166 166 167 if (failed) -
trunk/JavaScriptCore/ChangeLog
r41924 r41931 1 2009-03-23 Oliver Hunt <[email protected]> 2 3 Reviewed by Cameron Zwarich. 4 5 Fix className() for API defined class 6 7 * API/JSCallbackObjectFunctions.h: 8 (JSC::::className): 9 * API/tests/testapi.c: 10 (EmptyObject_class): 11 (main): 12 * API/tests/testapi.js: 13 1 14 2009-03-23 Oliver Hunt <[email protected]> 2 15
Note:
See TracChangeset
for help on using the changeset viewer.