Commit 2c4dbd45 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Fix memory leak in NavButtonProviderGtk3

Gtk increases the reference count of the cairo_pattern_t before returning it to
clients, so this CL adds the appropriate call to cairo_pattern_destroy().

R=thestig

Change-Id: I540c635e15d086aa515c0b1bc3953c1008df5607
Reviewed-on: https://chromium-review.googlesource.com/1058031Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558414}
parent 49da213d
...@@ -233,6 +233,7 @@ class NavButtonImageSource : public gfx::ImageSkiaSource { ...@@ -233,6 +233,7 @@ class NavButtonImageSource : public gfx::ImageSkiaSource {
ApplyCssToContext(button_context, ApplyCssToContext(button_context,
".titlebutton { background-size: contain; }"); ".titlebutton { background-size: contain; }");
} }
cairo_pattern_destroy(cr_pattern);
// Gtk doesn't support fractional scale factors, but chrome does. // Gtk doesn't support fractional scale factors, but chrome does.
// Rendering the button background and border at a fractional // Rendering the button background and border at a fractional
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment