Changeset 49802 in webkit for trunk/JavaScriptCore/API/tests/testapi.c
- Timestamp:
- Oct 19, 2009, 12:59:32 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/tests/testapi.c
r46598 r49802 26 26 #include "JavaScriptCore.h" 27 27 #include "JSBasePrivate.h" 28 #include "JSContextRefPrivate.h" 28 29 #include <math.h> 29 30 #define ASSERT_DISABLED 0 … … 42 43 #endif 43 44 44 static JSGlobalContextRef context = 0;45 static int failed = 0;45 static JSGlobalContextRef context; 46 static int failed; 46 47 static void assertEqualsAsBoolean(JSValueRef value, bool expectedValue) 47 48 { … … 619 620 } 620 621 621 static JSValueRef print_callAsFunction(JSContextRef c ontext, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)622 static JSValueRef print_callAsFunction(JSContextRef ctx, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 622 623 { 623 624 UNUSED_PARAM(functionObject); 624 625 UNUSED_PARAM(thisObject); 625 626 UNUSED_PARAM(exception); 627 628 ASSERT(JSContextGetGlobalContext(ctx) == context); 626 629 627 630 if (argumentCount > 0) { 628 JSStringRef string = JSValueToStringCopy(c ontext, arguments[0], NULL);631 JSStringRef string = JSValueToStringCopy(ctx, arguments[0], NULL); 629 632 size_t sizeUTF8 = JSStringGetMaximumUTF8CStringSize(string); 630 633 char* stringUTF8 = (char*)malloc(sizeUTF8); … … 635 638 } 636 639 637 return JSValueMakeUndefined(c ontext);640 return JSValueMakeUndefined(ctx); 638 641 } 639 642 … … 761 764 JSGlobalContextRetain(context); 762 765 JSGlobalContextRelease(context); 766 ASSERT(JSContextGetGlobalContext(context) == context); 763 767 764 768 JSReportExtraMemoryCost(context, 0);
Note:
See TracChangeset
for help on using the changeset viewer.