⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244011 in webkit


Ignore:
Timestamp:
Apr 8, 2019, 5:39:27 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r243291 - Fix possible memory leak when dismissing a color picker
https://bugs.webkit.org/show_bug.cgi?id=196026
<rdar://problem/48778568>

Reviewed by Wenson Hsieh.

Fix a problem with WebPageProxy::endColorPicker where an early return could leave a color picker
with a +1 reference count after dismissing it.

  • UIProcess/WebColorPicker.cpp:

(WebKit::WebColorPicker::endPicker):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::endColorPicker):
(WebKit::WebPageProxy::didEndColorPicker):

Location:
releases/WebKitGTK/webkit-2.24/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog

    r243993 r244011  
     12019-03-21  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Fix possible memory leak when dismissing a color picker
     4        https://bugs.webkit.org/show_bug.cgi?id=196026
     5        <rdar://problem/48778568>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        Fix a problem with WebPageProxy::endColorPicker where an early return could leave a color picker
     10        with a +1 reference count after dismissing it.
     11
     12        * UIProcess/WebColorPicker.cpp:
     13        (WebKit::WebColorPicker::endPicker):
     14        * UIProcess/WebPageProxy.cpp:
     15        (WebKit::WebPageProxy::endColorPicker):
     16        (WebKit::WebPageProxy::didEndColorPicker):
     17
    1182019-03-28  Michael Catanzaro  <mcatanzaro@igalia.com>
    219
  • releases/WebKitGTK/webkit-2.24/Source/WebKit/UIProcess/WebColorPicker.cpp

    r234788 r244011  
    11/*
    22 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
     3 * Copyright (C) 2019 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    4546        return;
    4647
    47     m_client->didEndColorPicker();
    48     m_client = nullptr;
     48    if (auto client = std::exchange(m_client, nullptr))
     49        client->didEndColorPicker();
    4950}
    5051
  • releases/WebKitGTK/webkit-2.24/Source/WebKit/UIProcess/WebPageProxy.cpp

    r242461 r244011  
    53375337void WebPageProxy::didEndColorPicker()
    53385338{
    5339     if (!isValid())
    5340         return;
    5341 
    53425339    m_colorPicker = nullptr;
     5340    if (!isValid())
     5341        return;
     5342
    53435343    m_process->send(Messages::WebPage::DidEndColorPicker(), m_pageID);
    53445344}
Note: See TracChangeset for help on using the changeset viewer.