+2006-12-21 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Tim Hatcher.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11922
+ Bug 11922: REGRESSION(r17128): Drosera no longer shows local variables in stack frame
+
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject webScriptAttributeKeysForScriptObject:]): Use an anonymous function with function.call to
+ ensure that the properties are being retrieved from the correct scope object.
+
2006-12-21 Lars Knoll <lars@trolltech.com>
Reviewed by Zack
- (NSArray *)webScriptAttributeKeysForScriptObject:(WebScriptObject *)object
{
- [object evaluateWebScript:@"this.__drosera_introspection = function () { var result = new Array(); for (var x in this) { result.push(x); } return result; }"];
+ WebScriptObject *enumerateAttributes = [object evaluateWebScript:@"(function () { var result = new Array(); for (var x in this) { result.push(x); } return result; })"];
NSMutableArray *result = [[NSMutableArray alloc] init];
- WebScriptObject *variables = [object callWebScriptMethod:@"__drosera_introspection" withArguments:nil];
+ WebScriptObject *variables = [enumerateAttributes callWebScriptMethod:@"call" withArguments:[NSArray arrayWithObject:object]];
unsigned length = [variables count];
for (unsigned i = 0; i < length; i++) {
NSString *key = [variables webScriptValueAtIndex:i];
- if (![key isEqualToString:@"__drosera_introspection"])
- [result addObject:key];
+ [result addObject:key];
}
- [object removeWebScriptKey:@"__drosera_introspection"];
-
[result sortUsingSelector:@selector(compare:)];
return [result autorelease];
}