Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(848)

Unified Diff: Source/core/html/forms/FormController.cpp

Issue 270483003: Oilpan: Prepare to move HTMLFormElement, HTMLFormElement::PastNamesMap, FormKeyGenerator, and FormS… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: FIXME: Oilpan: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/forms/FormController.h ('k') | Source/core/html/forms/InputTypeView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/html/forms/FormController.h ('k') | Source/core/html/forms/InputTypeView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698