Changeset 243291 in webkit
- Timestamp:
- Mar 21, 2019, 8:51:07 AM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/WebColorPicker.cpp (modified) (2 diffs)
-
UIProcess/WebPageProxy.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r243285 r243291 1 2019-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 1 18 2019-03-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/Source/WebKit/UIProcess/WebColorPicker.cpp
r234788 r243291 1 1 /* 2 2 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 45 46 return; 46 47 47 m_client->didEndColorPicker();48 m_client = nullptr;48 if (auto client = std::exchange(m_client, nullptr)) 49 client->didEndColorPicker(); 49 50 } 50 51 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r243231 r243291 5476 5476 void WebPageProxy::didEndColorPicker() 5477 5477 { 5478 if (!hasRunningProcess())5479 return;5480 5481 5478 m_colorPicker = nullptr; 5479 if (!hasRunningProcess()) 5480 return; 5481 5482 5482 m_process->send(Messages::WebPage::DidEndColorPicker(), m_pageID); 5483 5483 }
Note:
See TracChangeset
for help on using the changeset viewer.