Summary: | Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||
Component: | WebKit2 | Assignee: | Tim Horton <thorton> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andersca, mitz, sam, simon.fraser, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Tim Horton
2014-05-10 16:53:29 PDT
Created attachment 231244 [details]
patch
Comment on attachment 231244 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=231244&action=review > Source/WebKit2/UIProcess/ios/WKScrollView.mm:91 > + BOOL internalDelegateWillRespond = [_internalDelegate respondsToSelector:aSelector]; > + BOOL externalDelegateWillRespond = [_externalDelegate respondsToSelector:aSelector]; We could make things even faster by caching these for some or all selectors. > Source/WebKit2/UIProcess/ios/WKScrollView.mm:97 > + return self; The documentation for -forwardingTargetForSelector: says (Obviously if you return self from this method, the code would just fall into an infinite loop.) Why are you returning self? (In reply to comment #3) > (From update of attachment 231244 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=231244&action=review > > > Source/WebKit2/UIProcess/ios/WKScrollView.mm:91 > > + BOOL internalDelegateWillRespond = [_internalDelegate respondsToSelector:aSelector]; > > + BOOL externalDelegateWillRespond = [_externalDelegate respondsToSelector:aSelector]; > > We could make things even faster by caching these for some or all selectors. > > > Source/WebKit2/UIProcess/ios/WKScrollView.mm:97 > > + return self; > > The documentation for -forwardingTargetForSelector: says > (Obviously if you return self from this method, the code would just fall into an infinite loop.) > Why are you returning self? Ha! I missed that, and misunderstood the fallback case. Also that suggests to me that we never run into this case, because I haven't seen any infinite loops yet today :D Created attachment 231246 [details]
patch
|