Changeset 62791 in webkit
- Timestamp:
- Jul 8, 2010 9:08:33 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r62784 r62791 1 2010-07-08 Vitaly Repeshko <vitalyr@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Fix adoptRef usage violations (mostly in chromium) 6 https://bugs.webkit.org/show_bug.cgi?id=41863 7 8 * bindings/v8/V8DOMWrapper.cpp: 9 (WebCore::V8DOMWrapper::wrapNativeNodeFilter): 10 * bindings/v8/V8NodeFilterCondition.h: 11 (WebCore::V8NodeFilterCondition::create): 12 * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: 13 (WebCore::getNamedItems): 14 * bindings/v8/custom/V8HTMLCollectionCustom.cpp: 15 (WebCore::getNamedItems): 16 * bindings/v8/custom/V8HTMLFormElementCustom.cpp: 17 (WebCore::V8HTMLFormElement::namedPropertyGetter): 18 * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: 19 (WebCore::V8HTMLSelectElement::namedPropertyGetter): 20 * bindings/v8/custom/V8NamedNodesCollection.h: 21 (WebCore::V8NamedNodesCollection::create): 22 (WebCore::V8NamedNodesCollection::V8NamedNodesCollection): 23 * storage/IDBDatabaseRequest.cpp: 24 (WebCore::IDBDatabaseRequest::IDBDatabaseRequest): 25 * storage/IndexedDatabaseRequest.cpp: 26 (WebCore::IndexedDatabaseRequest::IndexedDatabaseRequest): 27 1 28 2010-07-08 Xan Lopez <xlopez@igalia.com> 2 29 -
trunk/WebCore/bindings/v8/V8DOMWrapper.cpp
r60932 r62791 225 225 return 0; 226 226 227 NodeFilterCondition* condition = new V8NodeFilterCondition(filter); 228 return NodeFilter::create(condition); 227 return NodeFilter::create(V8NodeFilterCondition::create(filter)); 229 228 } 230 229 -
trunk/WebCore/bindings/v8/V8NodeFilterCondition.h
r41920 r62791 34 34 #include "NodeFilterCondition.h" 35 35 #include <v8.h> 36 #include <wtf/PassRefPtr.h> 36 37 37 38 // NodeFilter is a JavaScript function that takes a Node as parameter and returns a short (ACCEPT, SKIP, REJECT) as the result. … … 44 45 class V8NodeFilterCondition : public NodeFilterCondition { 45 46 public: 46 explicit V8NodeFilterCondition(v8::Handle<v8::Value> filter); 47 static PassRefPtr<V8NodeFilterCondition> create(v8::Handle<v8::Value> filter) 48 { 49 return adoptRef(new V8NodeFilterCondition(filter)); 50 } 51 47 52 virtual ~V8NodeFilterCondition(); 48 53 … … 50 55 51 56 private: 57 explicit V8NodeFilterCondition(v8::Handle<v8::Value> filter); 58 52 59 mutable v8::Persistent<v8::Value> m_filter; 53 60 }; -
trunk/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
r54349 r62791 53 53 return toV8(namedItems.at(0).release()); 54 54 55 NodeList* list = new V8NamedNodesCollection(namedItems); 56 return toV8(list); 55 return toV8(V8NamedNodesCollection::create(namedItems)); 57 56 } 58 57 -
trunk/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
r54349 r62791 53 53 return toV8(namedItems.at(0).release()); 54 54 55 NodeList* list = new V8NamedNodesCollection(namedItems); 56 return toV8(list); 55 return toV8(V8NamedNodesCollection::create(namedItems)); 57 56 } 58 57 -
trunk/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp
r58295 r62791 78 78 return toV8(elements.at(0).release()); 79 79 80 NodeList* collection = new V8NamedNodesCollection(elements); 81 return toV8(collection); 80 return toV8(V8NamedNodesCollection::create(elements)); 82 81 } 83 82 -
trunk/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
r54305 r62791 71 71 return toV8(items.at(0).release()); 72 72 73 NodeList* list = new V8NamedNodesCollection(items); 74 return toV8(list); 73 return toV8(V8NamedNodesCollection::create(items)); 75 74 } 76 75 -
trunk/WebCore/bindings/v8/custom/V8NamedNodesCollection.h
r40873 r62791 34 34 #include "Node.h" 35 35 #include "NodeList.h" 36 #include <wtf/PassRefPtr.h> 36 37 #include <wtf/RefPtr.h> 37 38 #include <wtf/Vector.h> … … 41 42 class V8NamedNodesCollection : public NodeList { 42 43 public: 43 explicit V8NamedNodesCollection(const Vector<RefPtr<Node> >& nodes) 44 : m_nodes(nodes) { } 44 static PassRefPtr<NodeList> create(const Vector<RefPtr<Node> >& nodes) 45 { 46 return adoptRef(new V8NamedNodesCollection(nodes)); 47 } 48 45 49 virtual unsigned length() const { return m_nodes.size(); } 46 50 virtual Node* item(unsigned) const; … … 48 52 49 53 private: 54 explicit V8NamedNodesCollection(const Vector<RefPtr<Node> >& nodes) 55 : m_nodes(nodes) { } 56 50 57 Vector<RefPtr<Node> > m_nodes; 51 58 }; -
trunk/WebCore/storage/IDBDatabaseRequest.cpp
r61015 r62791 41 41 { 42 42 m_this = IDBAny::create(); 43 // We pass a reference to this object before it can be adopted. 44 relaxAdoptionRequirement(); 43 45 m_this->set(this); 44 46 } -
trunk/WebCore/storage/IndexedDatabaseRequest.cpp
r61120 r62791 46 46 { 47 47 m_this = IDBAny::create(); 48 // We pass a reference to this object before it can be adopted. 49 relaxAdoptionRequirement(); 48 50 m_this->set(this); 49 51 } … … 95 97 96 98 #endif // ENABLE(INDEXED_DATABASE) 97 -
trunk/WebKit/chromium/ChangeLog
r62774 r62791 1 2010-07-08 Vitaly Repeshko <vitalyr@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Fix adoptRef usage violations (mostly in chromium) 6 https://bugs.webkit.org/show_bug.cgi?id=41863 7 8 * src/IDBCallbacksProxy.cpp: 9 (WebCore::IDBCallbacksProxy::create): 10 * src/WebPopupMenuImpl.cpp: 11 (WebKit::WebPopupMenu::create): 12 * src/WebViewImpl.cpp: 13 (WebKit::WebView::create): 14 1 15 2010-07-07 Alexander Pavlov <apavlov@chromium.org> 2 16 -
trunk/WebKit/chromium/src/IDBCallbacksProxy.cpp
r62452 r62791 45 45 PassRefPtr<IDBCallbacksProxy> IDBCallbacksProxy::create(PassOwnPtr<WebKit::WebIDBCallbacks> callbacks) 46 46 { 47 return new IDBCallbacksProxy(callbacks);47 return adoptRef(new IDBCallbacksProxy(callbacks)); 48 48 } 49 49 … … 101 101 102 102 #endif // ENABLE(INDEXED_DATABASE) 103 -
trunk/WebKit/chromium/src/WebPopupMenuImpl.cpp
r62039 r62791 57 57 WebPopupMenu* WebPopupMenu::create(WebWidgetClient* client) 58 58 { 59 return new WebPopupMenuImpl(client); 59 // Pass the WebPopupMenuImpl's self-reference to the caller. 60 return adoptRef(new WebPopupMenuImpl(client)).leakRef(); 60 61 } 61 62 -
trunk/WebKit/chromium/src/WebViewImpl.cpp
r62774 r62791 171 171 WebView* WebView::create(WebViewClient* client, WebDevToolsAgentClient* devToolsClient) 172 172 { 173 return new WebViewImpl(client, devToolsClient); 173 // Pass the WebViewImpl's self-reference to the caller. 174 return adoptRef(new WebViewImpl(client, devToolsClient)).leakRef(); 174 175 } 175 176
Note: See TracChangeset
for help on using the changeset viewer.