Unreviewed trivial follow-up fix to r125873: Add missing adoptRef to avoid leaks.
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Aug 2012 12:30:31 +0000 (12:30 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Aug 2012 12:30:31 +0000 (12:30 +0000)
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::WeakMap::set):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125887 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bridge/qt/qt_instance.cpp

index 158cbbd..5bd3f56 100644 (file)
@@ -1,3 +1,10 @@
+2012-08-17  Simon Hausmann  <simon.hausmann@nokia.com>
+
+        Unreviewed trivial follow-up fix to r125873: Add missing adoptRef to avoid leaks.
+
+        * bridge/qt/qt_instance.cpp:
+        (JSC::Bindings::WeakMap::set):
+
 2012-08-17  Kentaro Hara  <haraken@chromium.org>
 
         Remove RefPtr from DateInputType::m_pickerElement
index d231c64..d36cf1c 100644 (file)
@@ -77,7 +77,7 @@ void WeakMap::set(JSContextRef context, void *key, JSObjectRef object)
         JSContextGroupRef group = JSContextGetGroup(context);
         WeakMapSet::AddResult entry = weakMaps.add(group, 0);
         if (entry.isNewEntry)
-            entry.iterator->second = new WeakMapImpl(group);
+            entry.iterator->second = adoptRef(new WeakMapImpl(group));
         m_impl = entry.iterator->second;
     }
     JSWeakObjectMapSet(m_impl->m_context, m_impl->m_map, key, object);