Summary: | [Qt] Assert in the tst_hybridPixmap::hybridPixmap() unit test. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jocelyn Turcotte <jturcotte> | ||||
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ademar, commit-queue, kenneth | ||||
Priority: | P3 | Keywords: | Qt, QtTriaged | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Jocelyn Turcotte
2010-10-26 07:08:56 PDT
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> |