Index: chrome/browser/dom_ui/chrome_url_data_manager.cc |
=================================================================== |
--- chrome/browser/dom_ui/chrome_url_data_manager.cc (revision 50559) |
+++ chrome/browser/dom_ui/chrome_url_data_manager.cc (working copy) |
@@ -169,6 +169,13 @@ |
if (i == Singleton<ChromeURLDataManager>()->file_sources_.end()) |
return false; |
+ // Check that |relative_path| is not an absolute path (otherwise AppendASCII() |
+ // will DCHECK). The awkward use of StringType is because on some systems |
+ // FilePath expects a std::string, but on others a std::wstring. |
+ FilePath p(FilePath::StringType(relative_path.begin(), relative_path.end())); |
+ if (p.IsAbsolute()) |
+ return false; |
+ |
*file_path = i->second.AppendASCII(relative_path); |
return true; |