Add URL emptiness check.
This commit is contained in:
parent
aba3f38a2f
commit
ea6fa8e5d2
@ -777,6 +777,9 @@ void WebPagesManager::on_get_web_page_instant_view_view_count(WebPageId web_page
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WebPagesManager::on_get_web_page_by_url(const string &url, WebPageId web_page_id, bool from_database) {
|
void WebPagesManager::on_get_web_page_by_url(const string &url, WebPageId web_page_id, bool from_database) {
|
||||||
|
if (url.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
auto emplace_result = url_to_web_page_id_.emplace(url, std::make_pair(web_page_id, from_database));
|
auto emplace_result = url_to_web_page_id_.emplace(url, std::make_pair(web_page_id, from_database));
|
||||||
auto &it = emplace_result.first;
|
auto &it = emplace_result.first;
|
||||||
bool is_inserted = emplace_result.second;
|
bool is_inserted = emplace_result.second;
|
||||||
|
Loading…
Reference in New Issue
Block a user