Title: [169803] trunk/Source/WebKit2
- Revision
- 169803
- Author
- zandober...@gmail.com
- Date
- 2014-06-11 05:22:04 -0700 (Wed, 11 Jun 2014)
Log Message
Avoid Vector copies in WebNotificationManagerProxy::providerDidCloseNotifications(), FindController::findStringMatches()
https://bugs.webkit.org/show_bug.cgi?id=133676
Reviewed by Andreas Kling.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Move the newly-created
Vector object into the HashMap<>::add() call.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findStringMatches): Movethe newly-create Vector object into the
Vector<>::append() call.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (169802 => 169803)
--- trunk/Source/WebKit2/ChangeLog 2014-06-11 12:20:49 UTC (rev 169802)
+++ trunk/Source/WebKit2/ChangeLog 2014-06-11 12:22:04 UTC (rev 169803)
@@ -1,3 +1,17 @@
+2014-06-11 Zan Dobersek <zdober...@igalia.com>
+
+ Avoid Vector copies in WebNotificationManagerProxy::providerDidCloseNotifications(), FindController::findStringMatches()
+ https://bugs.webkit.org/show_bug.cgi?id=133676
+
+ Reviewed by Andreas Kling.
+
+ * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
+ (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Move the newly-created
+ Vector object into the HashMap<>::add() call.
+ * WebProcess/WebPage/FindController.cpp:
+ (WebKit::FindController::findStringMatches): Movethe newly-create Vector object into the
+ Vector<>::append() call.
+
2014-06-11 Shivakumar JM <shiva...@samsung.com>
[EFL][WK2] Add missing test cases for EWK2ViewTest.
Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp (169802 => 169803)
--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp 2014-06-11 12:20:49 UTC (rev 169802)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp 2014-06-11 12:22:04 UTC (rev 169803)
@@ -217,7 +217,7 @@
if (pageIt == pageNotificationIDs.end()) {
Vector<uint64_t> newVector;
newVector.reserveInitialCapacity(size);
- pageIt = pageNotificationIDs.add(webPage, newVector).iterator;
+ pageIt = pageNotificationIDs.add(webPage, std::move(newVector)).iterator;
}
uint64_t pageNotificationID = it->value.second;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp (169802 => 169803)
--- trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp 2014-06-11 12:20:49 UTC (rev 169802)
+++ trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp 2014-06-11 12:22:04 UTC (rev 169803)
@@ -243,7 +243,7 @@
for (size_t i = 0; i < m_findMatches.size(); ++i) {
Vector<IntRect> rects;
m_findMatches[i]->textRects(rects);
- matchRects.append(rects);
+ matchRects.append(std::move(rects));
}
m_webPage->send(Messages::WebPageProxy::DidFindStringMatches(string, matchRects, indexForSelection));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes