Changeset 20642 in webkit
- Timestamp:
- Mar 31, 2007 9:48:17 PM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r20639 r20642 1 2007-03-31 Mark Rowe <mrowe@apple.com> 2 3 Reviewed by Darin. 4 5 A more correct fix for http://bugs.webkit.org/show_bug.cgi?id=13129 6 Bug 13129: Democracy Player dies in NSException from WebScriptObject on startup 7 8 The previous attempt at a fix in r20343 attempted to conditionally expose the 'count' 9 method. It did not work which resulted in 'count' always being hidden. This change 10 disables -[WebScriptObject count] completely until it can be determined whether it is 11 needed and how to support it without breaking third-party applications. 12 13 * bindings/objc/WebScriptObject.mm: 14 (-[WebScriptObject count]): 15 * bindings/objc/WebScriptObjectPrivate.h: 16 1 17 2007-03-31 Nicholas Shanks <webkit@nickshanks.com> 2 18 -
trunk/WebCore/bindings/objc/WebScriptObject.mm
r20495 r20642 498 498 @interface WebScriptObject (WebKitCocoaBindings) 499 499 500 - (unsigned)_count;501 500 - (id)objectAtIndex:(unsigned)index; 502 501 … … 505 504 @implementation WebScriptObject (WebKitCocoaBindings) 506 505 507 - (BOOL)_shouldRespondToCount 508 { 509 if (_private->shouldRespondToCountSet) 510 return _private->shouldRespondToCount; 511 512 BOOL shouldRespondToCount = YES; 513 514 @try { 515 [self valueForKey:@"length"]; 516 } @catch (id e) { 517 shouldRespondToCount = NO; 518 } 519 520 _private->shouldRespondToCount = shouldRespondToCount; 521 _private->shouldRespondToCountSet = YES; 522 523 return shouldRespondToCount; 524 } 525 526 - (IMP)methodForSelector:(SEL)selector 527 { 528 if (selector == @selector(count:) && [self _shouldRespondToCount]) 529 selector = @selector(_count:); 530 531 return [super methodForSelector:selector]; 532 } 533 534 - (BOOL)respondsToSelector:(SEL)selector 535 { 536 if (selector == @selector(count:) && [self _shouldRespondToCount]) 537 selector = @selector(_count:); 538 539 return [super respondsToSelector:selector]; 540 } 541 542 543 - (unsigned)_count 506 #if 0 507 // FIXME: presence of 'count' method on WebScriptObject breaks Democracy player 508 // http://bugs.webkit.org/show_bug.cgi?id=13129 509 510 - (unsigned)count 544 511 { 545 512 id length = [self valueForKey:@"length"]; … … 550 517 } 551 518 519 #endif 520 552 521 - (id)objectAtIndex:(unsigned)index 553 522 { -
trunk/WebCore/bindings/objc/WebScriptObjectPrivate.h
r20343 r20642 29 29 KJS::Bindings::RootObject* originRootObject; 30 30 BOOL isCreatedByDOMWrapper; 31 BOOL shouldRespondToCount;32 BOOL shouldRespondToCountSet;33 31 } 34 32 @end
Note: See TracChangeset
for help on using the changeset viewer.