.
Created attachment 328565 [details] Patch
Comment on attachment 328565 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328565&action=review > Source/WebCore/plugins/DOMMimeTypeArray.cpp:97 > + unsigned size = mimes.size(); > + > + Vector<AtomicString> result; > + result.reserveInitialCapacity(size); > + > + for (unsigned i = 0; i < size; ++i) > + result.uncheckedAppend(AtomicString(mimes[i].type)); Writing it like this gets rid of an unnecessary local variable, uses a modern for loop, gets rid of unnecessary explicit conversion to AtomicString, and saves a little bit of reference count churn by using WTFMove. Vector<AtomicString> result; result.reserveInitialCapacity(mimes.size()); for (auto& info : mimes) result.uncheckedAppend(WTFMove(info.type)); > Source/WebCore/plugins/DOMPluginArray.cpp:85 > + const Vector<PluginInfo>& plugins = data->publiclyVisiblePlugins(); > + unsigned size = plugins.size(); > + > + Vector<AtomicString> result; > + result.reserveInitialCapacity(size); > + > + for (unsigned i = 0; i < size; ++i) > + result.uncheckedAppend(AtomicString(plugins[i].name)); Writing it like this gets rid of an unnecessary written-out type, an unnecessary local variable, uses a modern for loop, and gets rid of unnecessary explicit conversion to AtomicString. auto& plugins = data->publiclyVisiblePlugins(); Vector<AtomicString> result; result.reserveInitialCapacity(plugins.size()); for (auto& plugin : plugins) result.uncheckedAppend(plugin.name);
Created attachment 329101 [details] Patch
Created attachment 329108 [details] Patch
Comment on attachment 329108 [details] Patch Clearing flags on attachment: 329108 Committed r225779: <https://trac.webkit.org/changeset/225779>
All reviewed patches have been landed. Closing bug.
<rdar://problem/35993095>