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

Unified Diff: bookmarks/bookmark_codec.cc

Issue 342046: Fix for crash when a bookmark URL is an empty string ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/chrome/browser/
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
« no previous file with comments | « no previous file | bookmarks/bookmark_storage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bookmarks/bookmark_codec.cc
===================================================================
--- bookmarks/bookmark_codec.cc (revision 30528)
+++ bookmarks/bookmark_codec.cc (working copy)
@@ -237,8 +237,9 @@
if (!value.GetString(kURLKey, &url_string))
return false;
- if (!node)
- node = new BookmarkNode(id, GURL(WideToUTF8(url_string)));
+ GURL url = GURL(WideToUTF8(url_string));
+ if (!node && url.is_valid())
+ node = new BookmarkNode(id, url);
else
return false; // Node invalid.
« no previous file with comments | « no previous file | bookmarks/bookmark_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698