diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-03 19:24:46 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-03 19:24:46 +0000 |
commit | 51e4bbbdb98e2d68fc805852dc575b610b16e2ea (patch) | |
tree | 26db13f7d79099b7c71368035ee93f6006302feb /webkit/port/bindings/v8/v8_proxy.cpp | |
parent | 813723af9619317730077211ac60f8c10eadcec2 (diff) | |
download | chromium_src-51e4bbbdb98e2d68fc805852dc575b610b16e2ea.zip chromium_src-51e4bbbdb98e2d68fc805852dc575b610b16e2ea.tar.gz chromium_src-51e4bbbdb98e2d68fc805852dc575b610b16e2ea.tar.bz2 |
use PassRefPtr for event creation rather than naked
pointers.
Review URL: http://codereview.chromium.org/6454
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2842 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings/v8/v8_proxy.cpp')
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index 0857184..4e3623a 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -779,17 +779,17 @@ void V8Proxy::SetJSWrapperForDOMNode(Node* node, v8::Persistent<v8::Object> wrap dom_node_map().set(node, wrapper); } -EventListener* V8Proxy::createHTMLEventHandler(const String& functionName, +PassRefPtr<EventListener> V8Proxy::createHTMLEventHandler(const String& functionName, const String& code, Node* node) { - return new V8LazyEventListener(m_frame, code, functionName); + return adoptRef(new V8LazyEventListener(m_frame, code, functionName)); } #if ENABLE(SVG) -EventListener* V8Proxy::createSVGEventHandler(const String& functionName, +PassRefPtr<EventListener> V8Proxy::createSVGEventHandler(const String& functionName, const String& code, Node* node) { - return new V8LazyEventListener(m_frame, code, functionName); + return adoptRef(new V8LazyEventListener(m_frame, code, functionName)); } #endif |