Changeset 50964 in webkit for trunk/JavaScriptCore/API/tests/testapi.c
- Timestamp:
- Nov 13, 2009, 12:42:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/tests/testapi.c
r49802 r50964 738 738 } 739 739 740 static JSValueRef jsNumberValue = NULL; 741 742 static void makeGlobalNumberValue(JSContextRef context) { 743 JSValueRef v = JSValueMakeNumber(context, 420); 744 JSValueProtect(context, v); 745 jsNumberValue = v; 746 v = NULL; 747 } 748 740 749 int main(int argc, char* argv[]) 741 750 { … … 949 958 950 959 jsGlobalValue = JSObjectMake(context, NULL, NULL); 960 makeGlobalNumberValue(context); 951 961 JSValueProtect(context, jsGlobalValue); 952 962 JSGarbageCollect(context); 953 963 ASSERT(JSValueIsObject(context, jsGlobalValue)); 954 964 JSValueUnprotect(context, jsGlobalValue); 965 JSValueUnprotect(context, jsNumberValue); 955 966 956 967 JSStringRef goodSyntax = JSStringCreateWithUTF8CString("x = 1;");
Note:
See TracChangeset
for help on using the changeset viewer.