ChromeFrame net tests would crash on startup while initializing the extensions service. The crash
occured while dereferencing a NULL manifest. Fix is to check for the same and avoid initializing
the extension if we don't have a manifest.
TBR=aa
Review URL: http://codereview.chromium.org/1107013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42240 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 3867ee3..db233aa 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -338,7 +338,10 @@
it != component_extension_manifests_.end(); ++it) {
JSONStringValueSerializer serializer(it->manifest);
scoped_ptr<Value> manifest(serializer.Deserialize(NULL));
- DCHECK(manifest.get());
+ if (!manifest.get()) {
+ NOTREACHED() << "Failed to retrieve manifest for extension";
+ continue;
+ }
scoped_ptr<Extension> extension(new Extension(it->root_directory));
extension->set_location(Extension::COMPONENT);