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

Side by Side Diff: Source/core/html/DOMFormData.cpp

Issue 1102253002: Oilpan: keep FormData on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/DOMFormData.h ('k') | Source/core/html/FormData.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return true; 61 return true;
62 } 62 }
63 63
64 DEFINE_INLINE_VIRTUAL_TRACE() 64 DEFINE_INLINE_VIRTUAL_TRACE()
65 { 65 {
66 visitor->trace(m_formData); 66 visitor->trace(m_formData);
67 PairIterable<String, FormDataEntryValue>::IterationSource::trace(visitor ); 67 PairIterable<String, FormDataEntryValue>::IterationSource::trace(visitor );
68 } 68 }
69 69
70 private: 70 private:
71 const RefPtrWillBeMember<DOMFormData> m_formData; 71 const Member<DOMFormData> m_formData;
72 size_t m_current; 72 size_t m_current;
73 }; 73 };
74 74
75 } // namespace 75 } // namespace
76 76
77 DOMFormData::DOMFormData(const WTF::TextEncoding& encoding) 77 DOMFormData::DOMFormData(const WTF::TextEncoding& encoding)
78 : FormDataList(encoding) 78 : FormDataList(encoding)
79 { 79 {
80 } 80 }
81 81
(...skipping 27 matching lines...) Expand all
109 result.setUSVString(entry.string()); 109 result.setUSVString(entry.string());
110 else if (entry.isFile()) 110 else if (entry.isFile())
111 result.setFile(entry.file()); 111 result.setFile(entry.file());
112 else 112 else
113 ASSERT(entry.isNone()); 113 ASSERT(entry.isNone());
114 } 114 }
115 115
116 Vector<FormDataEntryValue> DOMFormData::getAll(const String& name) 116 Vector<FormDataEntryValue> DOMFormData::getAll(const String& name)
117 { 117 {
118 Vector<FormDataEntryValue> results; 118 Vector<FormDataEntryValue> results;
119 WillBeHeapVector<FormDataList::Entry> entries = FormDataList::getAll(name); 119 HeapVector<FormDataList::Entry> entries = FormDataList::getAll(name);
120 for (size_t i = 0; i < entries.size(); ++i) { 120 for (const FormDataList::Entry& entry : entries) {
121 const FormDataList::Entry& entry = entries[i];
122 ASSERT(entry.name() == name); 121 ASSERT(entry.name() == name);
123 FormDataEntryValue value; 122 FormDataEntryValue value;
124 if (entry.isString()) 123 if (entry.isString())
125 value.setUSVString(entry.string()); 124 value.setUSVString(entry.string());
126 else if (entry.isFile()) 125 else if (entry.isFile())
127 value.setFile(entry.file()); 126 value.setFile(entry.file());
128 else 127 else
129 ASSERT_NOT_REACHED(); 128 ASSERT_NOT_REACHED();
130 results.append(value); 129 results.append(value);
131 } 130 }
(...skipping 10 matching lines...) Expand all
142 { 141 {
143 setBlob(name, blob, filename); 142 setBlob(name, blob, filename);
144 } 143 }
145 144
146 PairIterable<String, FormDataEntryValue>::IterationSource* DOMFormData::startIte ration(ScriptState*, ExceptionState&) 145 PairIterable<String, FormDataEntryValue>::IterationSource* DOMFormData::startIte ration(ScriptState*, ExceptionState&)
147 { 146 {
148 return new DOMFormDataIterationSource(this); 147 return new DOMFormDataIterationSource(this);
149 } 148 }
150 149
151 } // namespace blink 150 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/DOMFormData.h ('k') | Source/core/html/FormData.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698