Changeset 41846 in webkit for trunk/JavaScriptCore/API/tests/testapi.c
- Timestamp:
- Mar 19, 2009, 5:03:57 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/tests/testapi.c
r36863 r41846 992 992 JSClassRelease(globalObjectClass); 993 993 994 // Test for an infinite prototype chain that used to be created. This test 995 // passes if the call to JSObjectHasProperty() does not hang. 996 997 JSClassDefinition prototypeLoopClassDefinition = kJSClassDefinitionEmpty; 998 prototypeLoopClassDefinition.staticFunctions = globalObject_staticFunctions; 999 JSClassRef prototypeLoopClass = JSClassCreate(&prototypeLoopClassDefinition); 1000 JSGlobalContextRef prototypeLoopContext = JSGlobalContextCreateInGroup(NULL, prototypeLoopClass); 1001 1002 JSStringRef nameProperty = JSStringCreateWithUTF8CString("name"); 1003 JSObjectHasProperty(prototypeLoopContext, JSContextGetGlobalObject(prototypeLoopContext), nameProperty); 1004 1005 JSGlobalContextRelease(prototypeLoopContext); 1006 JSClassRelease(prototypeLoopClass); 1007 1008 printf("PASS: Infinite prototype chain does not occur.\n"); 1009 994 1010 printf("PASS: Program exited normally.\n"); 995 1011 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.