summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bridge/qt/qt_runtime.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-08-06 12:18:22 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-06 14:52:26 +0200
commitfe109d34374117ce5a1b37f56f8f04dbcb7ba65e (patch)
tree1cafae92b394a361a0ae8338c7ca414cc06cf58c /Source/WebCore/bridge/qt/qt_runtime.cpp
parent669ed590743b6c456f8b7cedab6d95a0ad845675 (diff)
[Qt] Fix minor memory leak in slot execution
Reviewed by Allan Sandfeld Jensen. Don't leak the "length" string when executing a slot in JavaScript. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtConnectionObject::execute): Change-Id: I7e7cd3c0bbe18e5345d9f024a95284c2c8ef09e9 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141420 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/bridge/qt/qt_runtime.cpp')
-rw-r--r--Source/WebCore/bridge/qt/qt_runtime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebCore/bridge/qt/qt_runtime.cpp b/Source/WebCore/bridge/qt/qt_runtime.cpp
index bb63d6695..da821ff9f 100644
--- a/Source/WebCore/bridge/qt/qt_runtime.cpp
+++ b/Source/WebCore/bridge/qt/qt_runtime.cpp
@@ -1566,7 +1566,7 @@ void QtConnectionObject::execute(void** argv)
const QMetaMethod method = meta->method(m_signalIndex);
JSValueRef* ignoredException = 0;
- JSRetainPtr<JSStringRef> lengthProperty(JSStringCreateWithUTF8CString("length"));
+ JSRetainPtr<JSStringRef> lengthProperty(Adopt, JSStringCreateWithUTF8CString("length"));
int receiverLength = int(JSValueToNumber(m_context, JSObjectGetProperty(m_context, m_receiverFunction, lengthProperty.get(), ignoredException), ignoredException));
int argc = qMax(method.parameterCount(), receiverLength);
WTF::Vector<JSValueRef> args(argc);