Changeset 15310 in webkit for trunk/JavaScriptCore/API/testapi.c
- Timestamp:
- Jul 10, 2006, 2:17:26 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/testapi.c
r15307 r15310 553 553 assert(!JSFunctionMakeWithBody(context, functionBuf, NULL, 1, &exception)); 554 554 assert(JSValueIsObject(exception)); 555 v = JSObjectGetProperty(context, exception, lineBuf);555 v = JSObjectGetProperty(context, JSValueToObject(context, exception), lineBuf); 556 556 assert(v); 557 557 assertEqualsAsNumber(v, 2); // FIXME: Lexer::setCode bumps startingLineNumber by 1 -- we need to change internal callers so that it doesn't have to (saying '0' to mean '1' in the API would be really confusing -- it's really confusing internally, in fact) … … 574 574 575 575 JSInternalStringRef printBuf = JSInternalStringCreateUTF8("print"); 576 JS ValueRef printFunction = JSFunctionMake(context, print_callAsFunction);576 JSObjectRef printFunction = JSFunctionMake(context, print_callAsFunction); 577 577 JSObjectSetProperty(context, globalObject, printBuf, printFunction, kJSPropertyAttributeNone); 578 578 JSInternalStringRelease(printBuf); … … 582 582 583 583 JSInternalStringRef myConstructorBuf = JSInternalStringCreateUTF8("MyConstructor"); 584 JS ValueRef myConstructor = JSConstructorMake(context, myConstructor_callAsConstructor);584 JSObjectRef myConstructor = JSConstructorMake(context, myConstructor_callAsConstructor); 585 585 JSObjectSetProperty(context, globalObject, myConstructorBuf, myConstructor, kJSPropertyAttributeNone); 586 586 JSInternalStringRelease(myConstructorBuf); … … 590 590 591 591 o = JSObjectMake(context, NULL, NULL); 592 JSObjectSetProperty(context, o, jsOneString , JSNumberMake(1), kJSPropertyAttributeNone);593 JSObjectSetProperty(context, o, jsCFString , JSNumberMake(1), kJSPropertyAttributeDontEnum);592 JSObjectSetProperty(context, o, jsOneStringBuf, JSNumberMake(1), kJSPropertyAttributeNone); 593 JSObjectSetProperty(context, o, jsCFStringBuf, JSNumberMake(1), kJSPropertyAttributeDontEnum); 594 594 JSPropertyEnumeratorRef enumerator = JSObjectCreatePropertyEnumerator(context, o); 595 595 int count = 0;
Note:
See TracChangeset
for help on using the changeset viewer.