RESOLVED FIXED 88805
unneeded object creation with Vector::append
https://bugs.webkit.org/show_bug.cgi?id=88805
Summary unneeded object creation with Vector::append
arno.
Reported 2012-06-11 14:02:34 PDT
Hi, in contextMenuItemVector, menuItemVector.append(ContextMenuItem(GTK_MENU_ITEM(widget))); creates a ContextMenuItem, and pass it to Vector::append(const U& val) which then creates a new object with new T(val) which just copies the ContextMenuItem object so, it's possible to just pass GTK_MENU_ITEM(widget), and only one ContextMenuItem object will be created. The same pattern is also present in KeyBindingTranslator::addPendingEditorCommand
Attachments
patch proposal (2.25 KB, patch)
2012-06-11 14:06 PDT, arno.
no flags
arno.
Comment 1 2012-06-11 14:06:50 PDT
Created attachment 146904 [details] patch proposal
WebKit Review Bot
Comment 2 2012-07-26 17:42:17 PDT
Comment on attachment 146904 [details] patch proposal Clearing flags on attachment: 146904 Committed r123821: <http://trac.webkit.org/changeset/123821>
WebKit Review Bot
Comment 3 2012-07-26 17:42:20 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.