summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 17:27:10 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 17:27:10 +0000
commitc579342792a7a130b2a58f071afac80ef0202252 (patch)
treed45ea6377636f1d7952a72038aa9b09cfbe3daea /base
parentb71a24d4c87b70586acb34eae882c8532fe86aba (diff)
downloadchromium_src-c579342792a7a130b2a58f071afac80ef0202252.zip
chromium_src-c579342792a7a130b2a58f071afac80ef0202252.tar.gz
chromium_src-c579342792a7a130b2a58f071afac80ef0202252.tar.bz2
Crash in a CHECK if we fail to load a data pack file. Running w/o our
resources is crazy talk. We've had 20 crashes here from 7 users, hopefully this will gives us some more info. Review URL: http://codereview.chromium.org/118326 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17869 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/data_pack.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/base/data_pack.cc b/base/data_pack.cc
index f41c6da..051fb4e 100644
--- a/base/data_pack.cc
+++ b/base/data_pack.cc
@@ -4,6 +4,8 @@
#include "base/data_pack.h"
+#include <errno.h>
+
#include "base/file_util.h"
#include "base/logging.h"
#include "base/string_piece.h"
@@ -48,8 +50,8 @@ DataPack::~DataPack() {
bool DataPack::Load(const FilePath& path) {
mmap_.reset(new file_util::MemoryMappedFile);
if (!mmap_->Initialize(path)) {
- mmap_.reset();
- return false;
+ CHECK(false) << "Failed to mmap " << path.value() << " errno: " <<
+ strerror(errno);
}
// Parse the header of the file.