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

Unified Diff: extensions/common/extension_api.cc

Issue 306893003: Fix channel check for fatal error suppression. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove CHECK in IsAvailable Created 6 years, 7 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 | « chrome/renderer/resources/extensions/last_error.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_api.cc
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc
index 9e284f245feca16c872420bd53387c8d9c07ca92..698e159218d5fe46b065d220fe7c1b0d48352829 100644
--- a/extensions/common/extension_api.cc
+++ b/extensions/common/extension_api.cc
@@ -267,7 +267,10 @@ Feature::Availability ExtensionAPI::IsAvailable(const std::string& full_name,
Feature::Context context,
const GURL& url) {
Feature* feature = GetFeatureDependency(full_name);
- CHECK(feature) << full_name;
+ if (!feature) {
+ return Feature::CreateAvailability(Feature::NOT_PRESENT,
+ std::string("Unknown feature: ") + full_name);
+ }
return IsAvailable(*feature, extension, context, url);
}
« no previous file with comments | « chrome/renderer/resources/extensions/last_error.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698