Bug 10159

Summary: REGRESSION: delegate returning no menu elements crashes webkit
Product: WebKit Reporter: Duncan Wilcox <duncan>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal Keywords: EasyFix, Regression
Priority: P1    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Patch
darin: review-
Patch with changelog darin: review+

Duncan Wilcox
Reported 2006-07-30 06:09:27 PDT
svn r14845 has a fix for <rdar://problem/4498606> REGRESSION (417.8-420+): 3 missing items (but extra separators) in context menu in Mail message body However if the context menu delegate returns no items, as in: - (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems { return [NSArray array]; } the patch above crashes because it doesn't check for zero menu items. The fix is trivial, attaching the patch.
Attachments
Patch (1.02 KB, patch)
2006-07-30 06:11 PDT, Duncan Wilcox
darin: review-
Patch with changelog (1.83 KB, patch)
2006-07-31 00:35 PDT, Duncan Wilcox
darin: review+
Duncan Wilcox
Comment 1 2006-07-30 06:11:41 PDT
Darin Adler
Comment 2 2006-07-30 09:27:41 PDT
Comment on attachment 9762 [details] Patch Change looks great. Needs a test case and a change log entry.
Duncan Wilcox
Comment 3 2006-07-31 00:35:12 PDT
Created attachment 9769 [details] Patch with changelog No automated test, because there's no way to programmatically open a context menu, no manual test because there's no way to customize the context menu delegate.
Darin Adler
Comment 4 2006-07-31 01:40:53 PDT
Comment on attachment 9769 [details] Patch with changelog r=me
Timothy Hatcher
Comment 5 2006-07-31 20:48:14 PDT
Landed in r15726.
Note You need to log in before you can comment on or make changes to this bug.