Platform cursors will be automatically ref-counted by migrating them to
use scoped_refptr.
Originally, the custom platform cursors were ref-counted manually in
several places: after using a custom cursor created by
CursorFactory::CreateImageCursor() and in ui::Cursor and
content::WebCursor, when custom cursors were stored
(Cursor::SetPlatformCursor()) and copied (copy constructors/operators).
By moving to a ref-counted type, many types of bugs that happened in the
past regarding WebCursor and PlatformCursor lifetimes will be prevented
(e.g. removing WebCursor::operator=, and thus leaking the custom cursor
resources on each assignment).
Bug: 1149906
Change-Id: If0f8c8570e6bcb47b203086dc90f49b8e7253fd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2255605
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/master@{#874510}