mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix dangling raw_ptr errors and related issues (see #3239)
- Use raw_ptr in class container fields. - Use defined lifespan for StreamReaderURLLoader. - Fix lifespan assumptions for WebContents/RFH usage.
This commit is contained in:
@@ -438,7 +438,7 @@ CefDownloadManagerDelegateImpl::GetOrAssociateBrowser(
|
||||
download::DownloadItem* item) {
|
||||
ItemBrowserMap::const_iterator it = item_browser_map_.find(item);
|
||||
if (it != item_browser_map_.end()) {
|
||||
return it->second;
|
||||
return it->second.get();
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserHostBase> browser;
|
||||
@@ -469,7 +469,7 @@ CefRefPtr<CefBrowserHostBase> CefDownloadManagerDelegateImpl::GetBrowser(
|
||||
DownloadItem* item) {
|
||||
ItemBrowserMap::const_iterator it = item_browser_map_.find(item);
|
||||
if (it != item_browser_map_.end()) {
|
||||
return it->second;
|
||||
return it->second.get();
|
||||
}
|
||||
|
||||
// If the download is rejected (e.g. ALT+click on an invalid protocol link)
|
||||
|
Reference in New Issue
Block a user