| Index: Source/core/html/forms/FormController.cpp
|
| diff --git a/Source/core/html/forms/FormController.cpp b/Source/core/html/forms/FormController.cpp
|
| index fa7e901351619b8059ea195e93a28713389b73e0..da0be4b098f28d2d9a5e3bda0c01953d7dc3d428 100644
|
| --- a/Source/core/html/forms/FormController.cpp
|
| +++ b/Source/core/html/forms/FormController.cpp
|
| @@ -288,19 +288,20 @@ Vector<String> SavedFormState::getReferencedFilePaths() const
|
|
|
| // ----------------------------------------------------------------------------
|
|
|
| -class FormKeyGenerator {
|
| +class FormKeyGenerator FINAL : public NoBaseWillBeGarbageCollectedFinalized<FormKeyGenerator> {
|
| WTF_MAKE_NONCOPYABLE(FormKeyGenerator);
|
| - WTF_MAKE_FAST_ALLOCATED;
|
| + WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
|
|
|
| public:
|
| - static PassOwnPtr<FormKeyGenerator> create() { return adoptPtr(new FormKeyGenerator); }
|
| + static PassOwnPtrWillBeRawPtr<FormKeyGenerator> create() { return adoptPtrWillBeNoop(new FormKeyGenerator); }
|
| + void trace(Visitor* visitor) { visitor->trace(m_formToKeyMap); }
|
| const AtomicString& formKey(const HTMLFormControlElementWithState&);
|
| void willDeleteForm(HTMLFormElement*);
|
|
|
| private:
|
| FormKeyGenerator() { }
|
|
|
| - typedef HashMap<HTMLFormElement*, AtomicString> FormToKeyMap;
|
| + typedef WillBeHeapHashMap<RawPtrWillBeMember<HTMLFormElement>, AtomicString> FormToKeyMap;
|
| typedef HashMap<String, unsigned> FormSignatureToNextIndexMap;
|
| FormToKeyMap m_formToKeyMap;
|
| FormSignatureToNextIndexMap m_formSignatureToNextIndexMap;
|
| @@ -411,7 +412,7 @@ static String formStateSignature()
|
|
|
| Vector<String> DocumentState::toStateVector()
|
| {
|
| - OwnPtr<FormKeyGenerator> keyGenerator = FormKeyGenerator::create();
|
| + OwnPtrWillBeRawPtr<FormKeyGenerator> keyGenerator = FormKeyGenerator::create();
|
| OwnPtr<SavedFormStateMap> stateMap = adoptPtr(new SavedFormStateMap);
|
| for (FormElementListHashSet::const_iterator it = m_formControls.begin(); it != m_formControls.end(); ++it) {
|
| HTMLFormControlElementWithState* control = (*it).get();
|
| @@ -451,6 +452,7 @@ FormController::~FormController()
|
| void FormController::trace(Visitor* visitor)
|
| {
|
| visitor->trace(m_documentState);
|
| + visitor->trace(m_formKeyGenerator);
|
| }
|
|
|
| DocumentState* FormController::formElementsState() const
|
|
|