Unreviewed. Addressing reviewing comments for r166491 that I forgot
to address before landing.

* html/FormController.cpp:
(WebCore::SavedFormState::deserialize): No need to move the std::unique_ptr
object on the way out.
(WebCore::FormController::createSavedFormStateMap): FormKeyGenerator can be
allocated on the stack.
(WebCore::FormController::formStatesFromStateVector): Use auto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/html/FormController.cpp b/Source/WebCore/html/FormController.cpp
index e988994..549e7db 100644
--- a/Source/WebCore/html/FormController.cpp
+++ b/Source/WebCore/html/FormController.cpp
@@ -216,7 +216,7 @@
             return nullptr;
         savedFormState->appendControlState(name, type, state);
     }
-    return std::move(savedFormState);
+    return savedFormState;
 }
 
 void SavedFormState::serializeTo(Vector<String>& stateVector) const
@@ -396,13 +396,13 @@
 
 std::unique_ptr<FormController::SavedFormStateMap> FormController::createSavedFormStateMap(const FormElementListHashSet& controlList)
 {
-    auto keyGenerator = std::make_unique<FormKeyGenerator>();
+    FormKeyGenerator keyGenerator;
     auto stateMap = std::make_unique<SavedFormStateMap>();
     for (FormElementListHashSet::const_iterator it = controlList.begin(); it != controlList.end(); ++it) {
         HTMLFormControlElementWithState* control = it->get();
         if (!control->shouldSaveAndRestoreFormControlState())
             continue;
-        auto& formState = stateMap->add(keyGenerator->formKey(*control).impl(), nullptr).iterator->value;
+        auto& formState = stateMap->add(keyGenerator.formKey(*control).impl(), nullptr).iterator->value;
         if (!formState)
             formState = std::make_unique<SavedFormState>();
         formState->appendControlState(control->name(), control->type(), control->saveFormControlState());
@@ -456,7 +456,7 @@
 
     while (i + 1 < stateVector.size()) {
         AtomicString formKey = stateVector[i++];
-        std::unique_ptr<SavedFormState> state = SavedFormState::deserialize(stateVector, i);
+        auto state = SavedFormState::deserialize(stateVector, i);
         if (!state) {
             i = 0;
             break;