[WK2] Make updates on ViewUpdateDispatcher less heavy
Created attachment 227520 [details] Patch
Comment on attachment 227520 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227520&action=review > Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp:74 > localCopy.swap(m_latestUpdate); This should really use std::move instead of swap. Swap was the hack for doing this before we had move assignment. Also, the code below uses the word “iterator” strangely. It should be written like this: for (uint64_t pageID : localCopy.keys())
Comment on attachment 227520 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227520&action=review >> Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp:74 >> localCopy.swap(m_latestUpdate); > > This should really use std::move instead of swap. Swap was the hack for doing this before we had move assignment. > > Also, the code below uses the word “iterator” strangely. It should be written like this: > > for (uint64_t pageID : localCopy.keys()) Oops, that was wrong. Obviously we want both keys and values. I just don’t think that “iterator” is the right name for an entry in a HashMap. I suggest the name "slot".
Committed r166191: <http://trac.webkit.org/changeset/166191>