Title: [146711] trunk/Source/_javascript_Core
- Revision
- 146711
- Author
- [email protected]
- Date
- 2013-03-22 21:20:21 -0700 (Fri, 22 Mar 2013)
Log Message
testLeakingPrototypesAcrossContexts added in r146682 doesn't compile on Win and fails on Mac
https://bugs.webkit.org/show_bug.cgi?id=113125
Reviewed by Mark Hahnenberg
Remove the test added in r146682 as it's now failing on Mac.
This is the test that was causing a compilation failure on Windows.
* API/tests/testapi.c:
(main):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/API/tests/testapi.c (146710 => 146711)
--- trunk/Source/_javascript_Core/API/tests/testapi.c 2013-03-23 03:35:29 UTC (rev 146710)
+++ trunk/Source/_javascript_Core/API/tests/testapi.c 2013-03-23 04:20:21 UTC (rev 146711)
@@ -134,63 +134,6 @@
JSStringRelease(valueAsString);
}
-#if !OS(WINDOWS)
-static int leakedObject = 1;
-
-static void leakFinalize(JSObjectRef object)
-{
- (void)object;
- leakedObject = 0;
-}
-
-// This is a hack to avoid the C++ stack keeping the original JSObject alive.
-static void nestedAllocateObject(JSContextRef context, JSClassRef class, unsigned n)
-{
- if (!n) {
- JSObjectRef object = JSObjectMake(context, class, 0);
- JSObjectRef globalObject = JSContextGetGlobalObject(context);
- JSStringRef propertyName = JSStringCreateWithUTF8CString("value");
- JSObjectSetProperty(context, globalObject, propertyName, object, kJSPropertyAttributeNone, 0);
- JSStringRelease(propertyName);
- return;
- }
- nestedAllocateObject(context, class, n - 1);
-}
-
-static void testLeakingPrototypesAcrossContexts()
-{
- JSClassDefinition leakDefinition = kJSClassDefinitionEmpty;
- leakDefinition.finalize = leakFinalize;
- JSClassRef leakClass = JSClassCreate(&leakDefinition);
-
- JSContextGroupRef group = JSContextGroupCreate();
-
- {
- JSGlobalContextRef context1 = JSGlobalContextCreateInGroup(group, NULL);
- nestedAllocateObject(context1, leakClass, 10);
- JSGlobalContextRelease(context1);
- }
-
- {
- JSGlobalContextRef context2 = JSGlobalContextCreateInGroup(group, NULL);
- JSObjectRef object2 = JSObjectMake(context2, leakClass, 0);
- JSValueProtect(context2, object2);
- JSSynchronousGarbageCollectForDebugging(context2);
- if (leakedObject) {
- printf("FAIL: Failed to finalize the original object after the first GC.\n");
- failed = 1;
- } else
- printf("PASS: Finalized the original object as expected.\n");
- JSValueUnprotect(context2, object2);
- JSGlobalContextRelease(context2);
- }
-
- JSContextGroupRelease(group);
-
- JSClassRelease(leakClass);
-}
-#endif
-
static bool timeZoneIsPST()
{
char timeZoneName[70];
@@ -1744,10 +1687,6 @@
free(scriptUTF8);
}
-#if !OS(WINDOWS)
- testLeakingPrototypesAcrossContexts();
-#endif
-
// Clear out local variables pointing at JSObjectRefs to allow their values to be collected
function = NULL;
v = NULL;
Modified: trunk/Source/_javascript_Core/ChangeLog (146710 => 146711)
--- trunk/Source/_javascript_Core/ChangeLog 2013-03-23 03:35:29 UTC (rev 146710)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-03-23 04:20:21 UTC (rev 146711)
@@ -1,5 +1,18 @@
2013-03-22 Ryosuke Niwa <[email protected]>
+ testLeakingPrototypesAcrossContexts added in r146682 doesn't compile on Win and fails on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=113125
+
+ Reviewed by Mark Hahnenberg
+
+ Remove the test added in r146682 as it's now failing on Mac.
+ This is the test that was causing a compilation failure on Windows.
+
+ * API/tests/testapi.c:
+ (main):
+
+2013-03-22 Ryosuke Niwa <[email protected]>
+
Fix the typo: WIN -> WINDOWS.
* API/tests/testapi.c:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes