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

Side by Side Diff: Source/web/WebFormElement.cpp

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pre-emptively GC a long runnning test 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 void WebFormElement::submit() 73 void WebFormElement::submit()
74 { 74 {
75 unwrap<HTMLFormElement>()->submit(); 75 unwrap<HTMLFormElement>()->submit();
76 } 76 }
77 77
78 void WebFormElement::getNamedElements(const WebString& name, 78 void WebFormElement::getNamedElements(const WebString& name,
79 WebVector<WebNode>& result) 79 WebVector<WebNode>& result)
80 { 80 {
81 Vector<RefPtr<Element> > tempVector; 81 WillBeHeapVector<RefPtrWillBeMember<Element> > tempVector;
82 unwrap<HTMLFormElement>()->getNamedElements(name, tempVector); 82 unwrap<HTMLFormElement>()->getNamedElements(name, tempVector);
83 #if ENABLE(OILPAN) 83 #if ENABLE(OILPAN)
84 // FIXME: The second argument of HTMLFormElement::getNamedElements should be 84 // FIXME: The second argument of HTMLFormElement::getNamedElements should be
tkent 2014/05/13 11:20:37 We can resolve this FIXME.
sof 2014/05/15 09:23:24 Done, but the type conversions needed to be able t
85 // HeapVector<Member<Element>>. 85 // HeapVector<Member<Element>>.
86 Vector<WebNode> tempVector2; 86 Vector<WebNode> tempVector2;
87 tempVector2.reserveCapacity(tempVector.size()); 87 tempVector2.reserveCapacity(tempVector.size());
88 for (size_t i = 0; i < tempVector.size(); ++i) 88 for (size_t i = 0; i < tempVector.size(); ++i)
89 tempVector2.append(WebNode(tempVector[i].get())); 89 tempVector2.append(WebNode(tempVector[i].get()));
90 result.assign(tempVector2); 90 result.assign(tempVector2);
91 #else 91 #else
92 result.assign(tempVector); 92 result.assign(tempVector);
93 #endif 93 #endif
94 } 94 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 m_private = e; 126 m_private = e;
127 return *this; 127 return *this;
128 } 128 }
129 129
130 WebFormElement::operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const 130 WebFormElement::operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const
131 { 131 {
132 return toHTMLFormElement(m_private.get()); 132 return toHTMLFormElement(m_private.get());
133 } 133 }
134 134
135 } // namespace blink 135 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698