Changeset 195992 in webkit


Ignore:
Timestamp:
Feb 1, 2016 4:46:33 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Free Colormap when XWindow is destroyed.
https://bugs.webkit.org/show_bug.cgi?id=153413

Patch by Sun-woo Nam <sunny.nam@samsung.com> on 2016-02-01
Reviewed by Žan Doberšek.

Colormap is needed to create XWindow and it should be freed when XWindow is destroyed.
Unless Colormap is freed before destroying XWindow, memory leak is suspected.
XFreeColormap therefore is needed on X11Helper.

  • platform/graphics/surfaces/glx/X11Helper.cpp: Added XFreeColormap.

(WebCore::X11Helper::destroyWindow):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r195979 r195992  
     12016-02-01  Sun-woo Nam  <sunny.nam@samsung.com>
     2
     3        Free Colormap when XWindow is destroyed.
     4        https://bugs.webkit.org/show_bug.cgi?id=153413
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Colormap is needed to create XWindow and it should be freed when XWindow is destroyed.
     9        Unless Colormap is freed before destroying XWindow, memory leak is suspected.
     10        XFreeColormap therefore is needed on X11Helper.
     11
     12        * platform/graphics/surfaces/glx/X11Helper.cpp: Added XFreeColormap.
     13        (WebCore::X11Helper::destroyWindow):
     14
    1152016-02-01  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp

    r184197 r195992  
    291291        return;
    292292
     293    XWindowAttributes attribute;
     294    XGetWindowAttributes(display, windowId, &attribute);
     295
     296    XFreeColormap(display, attribute.colormap);
    293297    XDestroyWindow(display, windowId);
    294298}
Note: See TracChangeset for help on using the changeset viewer.