[Webkit-unassigned] [Bug 151513] REGRESSION(r192247): [GTK] ASSERTION FAILED: type == WebCore::ActionType || type == WebCore::CheckableActionType || type == WebCore::SeparatorType

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 1 00:05:42 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=151513

--- Comment #5 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 266243
  --> https://bugs.webkit.org/attachment.cgi?id=266243
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=266243&action=review

>> Source/WebKit2/Shared/gtk/WebContextMenuItemGtk.cpp:128
>> +    : WebContextMenuItemData(data.type() == SubmenuType ? ActionType : data.type(), data.action(), data.title(), data.enabled(), data.checked())
> 
> I think you should add this check to the constructor above, as well...

I don't think so, the constructor above receives a type, the caller should provide the right type. We internally don't use the submenu type,l so we only need to check it when constructing from an external source like WebContextMenuItemData, but not from our own implementation

>> Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp:212
>> +    item->priv->menuItem = std::make_unique<WebContextMenuItemGtk>(ActionType, ContextMenuItemBaseApplicationTag, String::fromUTF8(label));
> 
> ...so that you don't need to do this.

I prefer to make this explicit. This is building a WebContextMenuItemGtk, which doesn't use SubmenuType.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151201/d938f96e/attachment-0001.html>


More information about the webkit-unassigned mailing list