Changeset 260545 in webkit
- Timestamp:
- Apr 22, 2020 5:27:58 PM (4 years ago)
- Location:
- trunk/Source/WebKitLegacy/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKitLegacy/mac/ChangeLog
r260486 r260545 1 2020-04-22 Darin Adler <darin@apple.com> 2 3 [Cocoa] REGRESSION (r260485): Crash in Legacy WebKit createMenu item function (reproducible under Asan) 4 https://bugs.webkit.org/show_bug.cgi?id=210888 5 6 Reviewed by Alex Christensen. 7 8 * WebView/WebHTMLView.mm: 9 (createMenuItem): Speculative fix: Go back to using a local variable. Apparently 10 the Objective-C for loop doesn't extend the lifetime of its argument the way the 11 C++ range-based for loop does, so the local variable is needed. 12 1 13 2020-04-21 Peng Liu <peng.liu6@apple.com> 2 14 -
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
r260485 r260545 3673 3673 case WebCore::SubmenuType: { 3674 3674 auto menu = adoptNS([[NSMenu alloc] init]); 3675 3676 for (NSMenuItem *menuItem in createMenuItems(hitTestResult, item.subMenuItems()).get()) 3677 [menu addItem:menuItem]; 3675 { 3676 auto submenuItems = createMenuItems(hitTestResult, item.subMenuItems()); 3677 for (NSMenuItem *menuItem in submenuItems.get()) 3678 [menu addItem:menuItem]; 3679 } 3678 3680 3679 3681 auto menuItem = adoptNS([[NSMenuItem alloc] initWithTitle:item.title() action:nullptr keyEquivalent:@""]);
Note: See TracChangeset
for help on using the changeset viewer.