ASSERTION FAILED: !m_adoptionIsRequired (../../../JavaScriptCore/wtf/RefCounted.h:37 void WTF::RefCountedBase::ref())
Created attachment 71877 [details] Patch
Comment on attachment 71877 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=71877&action=review > WebCore/bridge/qt/qt_pixmapruntime.cpp:358 > - QtPixmapInstance* instance = new QtPixmapInstance(root, data); > + RefPtr<QtPixmapInstance> instance = adoptRef(new QtPixmapInstance(root, data)); What happens with the QtPixmapInstance after this function returns? I'm asking because it was leaked previously, and createRuntimeObject() returns a member of the instance.
(In reply to comment #2) > (From update of attachment 71877 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=71877&action=review > > > WebCore/bridge/qt/qt_pixmapruntime.cpp:358 > > - QtPixmapInstance* instance = new QtPixmapInstance(root, data); > > + RefPtr<QtPixmapInstance> instance = adoptRef(new QtPixmapInstance(root, data)); > > What happens with the QtPixmapInstance after this function returns? > I'm asking because it was leaked previously, and createRuntimeObject() returns a member of the instance. You are right, it will be dereffed on return. It depends on what createRuntimeObject is doing.
> > WebCore/bridge/qt/qt_pixmapruntime.cpp:358 > > - QtPixmapInstance* instance = new QtPixmapInstance(root, data); > > + RefPtr<QtPixmapInstance> instance = adoptRef(new QtPixmapInstance(root, data)); > > What happens with the QtPixmapInstance after this function returns? > I'm asking because it was leaked previously, and createRuntimeObject() returns a member of the instance. That member which is being returned is created by newRuntimeObject, but not owner by the Instance.
Comment on attachment 71877 [details] Patch Clearing flags on attachment: 71877 Committed r70557: <http://trac.webkit.org/changeset/70557>
All reviewed patches have been landed. Closing bug.
Revision r70557 cherry-picked into qtwebkit-2.1 with commit 12362e4 <http://gitorious.org/webkit/qtwebkit/commit/12362e4>