Permalink
Browse files

Fixed test 3 bug : new class DerivedTest2 was retained and caused a c…

…rash if a test failed. set newClass = null in test
  • Loading branch information...
1 parent 3969f9f commit 9ec11732cb2036ada11c2b51ab5a20b360caa0b5 @parmanoir committed Aug 17, 2011
@@ -1862,7 +1862,8 @@ - (id)classForJSFunction:(JSObjectRef)function
//
+ (NSString*)formatJSException:(JSValueRef)exception inContext:(JSContextRef)context
{
- if (!exception) return @"formatJSException:(null)";
+ if (!exception)
+ return @"formatJSException:(null)";
// Convert exception to string
JSStringRef resultStringJS = JSValueToStringCopy(context, exception, NULL);
NSString* b = (NSString*)JSStringCopyCFString(kCFAllocatorDefault, resultStringJS);
@@ -43,7 +43,9 @@ - (void)cleanUp
// if ([object isKindOfClass:[JSCocoaController class]])
// [object autorelease];
// else
+NSLog(@"about to cleanup %p", object);
[object release];
+NSLog(@"cleaned %p", object);
}
if (jsValue)
{
@@ -96,6 +98,7 @@ - (void)setObject:(id)o
{
// if (object && retainObject)
// [object release];
+NSLog(@"about to set %p (class=%@, object=%@)", o, [o class], o);
object = o;
if (object && [object retainCount] == -1) return;
[object retain];
View
@@ -178,7 +178,7 @@ SOFTWARE.
// application itself.
// http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
-//"use strict";
+"use strict";
function JSLintWithLogs(logs)
{
@@ -5672,7 +5672,13 @@ members)?
};
itself.edition = '2009-05-06';
-
+/*
+ var JSLINTGLOBALS = {}
+ var _varstatement = varstatement
+ varstatement = function () {
+ return _varstatement.apply(JSLINTGLOBALS, arguments)
+ }
+*/
return itself;
});
View
@@ -74,3 +74,6 @@
o = null
o2 = null
+ newClass = null
+
+
Oops, something went wrong.

0 comments on commit 9ec1173

Please sign in to comment.