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

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

Issue 277753003: Oilpan: Prepare to move FormController and DocumentState to Oilpan heap, and remove RefPtrs to HTML… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/HTMLFormElement.cpp ('k') | Source/core/html/forms/FormController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/FormController.h
diff --git a/Source/core/html/forms/FormController.h b/Source/core/html/forms/FormController.h
index 40505d3e8e25d70fd0dfc5943523aabc365fdf6a..d2e15867f58510a618b95f7cac888c0e6ff61d36 100644
--- a/Source/core/html/forms/FormController.h
+++ b/Source/core/html/forms/FormController.h
@@ -23,6 +23,7 @@
#define FormController_h
#include "core/html/forms/RadioButtonGroupScope.h"
+#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/ListHashSet.h"
#include "wtf/Vector.h"
@@ -73,28 +74,30 @@ inline void FormControlState::append(const String& value)
typedef HashMap<AtomicString, OwnPtr<SavedFormState> > SavedFormStateMap;
-class DocumentState : public RefCounted<DocumentState> {
+class DocumentState : public RefCountedWillBeGarbageCollectedFinalized<DocumentState> {
Mads Ager (chromium) 2014/05/09 05:40:08 Looks like this one does not need finalization and
tkent 2014/05/09 06:07:23 I tried it, but blink_gc_plugin warned that HeapHa
zerny-chromium 2014/05/09 06:41:19 Yes. The ListHashSet currently has a user declared
public:
- static PassRefPtr<DocumentState> create();
+ static PassRefPtrWillBeRawPtr<DocumentState> create();
~DocumentState();
+ void trace(Visitor*);
void addControl(HTMLFormControlElementWithState*);
void removeControl(HTMLFormControlElementWithState*);
Vector<String> toStateVector();
private:
- typedef ListHashSet<RefPtr<HTMLFormControlElementWithState>, 64> FormElementListHashSet;
+ typedef WillBeHeapListHashSet<RefPtrWillBeMember<HTMLFormControlElementWithState>, 64> FormElementListHashSet;
FormElementListHashSet m_formControls;
};
-class FormController {
- WTF_MAKE_FAST_ALLOCATED;
+class FormController : public NoBaseWillBeGarbageCollectedFinalized<FormController> {
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
- static PassOwnPtr<FormController> create()
+ static PassOwnPtrWillBeRawPtr<FormController> create()
{
- return adoptPtr(new FormController);
+ return adoptPtrWillBeNoop(new FormController);
}
~FormController();
+ void trace(Visitor*);
RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupScope; }
@@ -116,7 +119,7 @@ private:
static void formStatesFromStateVector(const Vector<String>&, SavedFormStateMap&);
RadioButtonGroupScope m_radioButtonGroupScope;
- RefPtr<DocumentState> m_documentState;
+ RefPtrWillBeMember<DocumentState> m_documentState;
SavedFormStateMap m_savedFormStateMap;
OwnPtr<FormKeyGenerator> m_formKeyGenerator;
};
« no previous file with comments | « Source/core/html/HTMLFormElement.cpp ('k') | Source/core/html/forms/FormController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698