Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Unified Diff: chrome/browser/bookmarks/bookmark_storage.cc

Issue 282004: Fix for crash when a bookmark URL is an empty string... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/bookmarks/bookmark_storage.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_storage.cc (revision 29121)
+++ chrome/browser/bookmarks/bookmark_storage.cc (working copy)
@@ -82,7 +82,7 @@
scoped_ptr<Value> root(serializer.Deserialize(NULL));
if (root.get()) {
- // Building the index cane take a while, so we do it on the background
+ // Building the index can take a while, so we do it on the background
// thread.
int64 max_node_id = 0;
BookmarkCodec codec;
@@ -117,7 +117,8 @@
// Adds node to the model's index, recursing through all children as well.
void AddBookmarksToIndex(BookmarkNode* node) {
if (node->is_url()) {
- details_->index()->Add(node);
+ if (node->GetURL().is_valid())
+ details_->index()->Add(node);
} else {
for (int i = 0; i < node->GetChildCount(); ++i)
AddBookmarksToIndex(node->GetChild(i));
« chrome/browser/bookmarks/bookmark_codec.cc ('K') | « chrome/browser/bookmarks/bookmark_codec.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698