Bug 64241 - WebKit2 is leaking NSCursors created by leakNamedCursor
Summary: WebKit2 is leaking NSCursors created by leakNamedCursor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-10 11:30 PDT by Anders Carlsson
Modified: 2011-07-10 19:08 PDT (History)
1 user (show)

See Also:


Attachments
Patch (12.75 KB, patch)
2011-07-10 11:40 PDT, Anders Carlsson
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2011-07-10 11:30:54 PDT
WebKit2 is leaking NSCursors created by leakNamedCursor
Comment 1 Anders Carlsson 2011-07-10 11:40:04 PDT
Created attachment 100233 [details]
Patch
Comment 2 Darin Adler 2011-07-10 12:41:42 PDT
Wouldn’t it be better to cache each of these NSCursor objects exactly once?
Comment 3 Darin Adler 2011-07-10 12:41:53 PDT
Except for the custom cursor one?
Comment 4 Anders Carlsson 2011-07-10 16:10:41 PDT
(In reply to comment #2)
> Wouldn’t it be better to cache each of these NSCursor objects exactly once?

We're already caching them in the Cursor singletons in WebKit1, and for WebKit2 that's what the forcing of platformCursor does. I don't like the idea of having three levels of caches for some Cursors (WKSI, CursorMac.mm and Cursor.cpp).
Comment 5 Darin Adler 2011-07-10 17:32:08 PDT
(In reply to comment #4)
> for WebKit2 that's what the forcing of platformCursor does

So I guess that’s the real fix. Not sure the rest of this patch was needed.
Comment 6 Anders Carlsson 2011-07-10 19:02:15 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > for WebKit2 that's what the forcing of platformCursor does
> 
> So I guess that’s the real fix. Not sure the rest of this patch was needed.

Right. I figured I'd do that part anyway since I don't like having potential leaks present in the code. In the future I think we can get rid of the Cursor singletons and cache the underlying platform cursors instead.
Comment 7 Anders Carlsson 2011-07-10 19:08:47 PDT
Committed r90705: <http://trac.webkit.org/changeset/90705>