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

Unified Diff: chrome/renderer/extensions/dispatcher.cc

Issue 117843003: Features are function names if they have a parent feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 7 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/dispatcher.cc
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
index da0d23efd8c8f137c06b0f3e36ff20cdcf2c08db..05785c8f897569006261002ef046862bf8f81e7e 100644
--- a/chrome/renderer/extensions/dispatcher.cc
+++ b/chrome/renderer/extensions/dispatcher.cc
@@ -750,17 +750,9 @@ void Dispatcher::AddOrRemoveBindingsForContext(ChromeV8Context* context) {
if (feature->IsInternal())
continue;
- // If this API name has parent features, then this must be a function or
- // event, so we should not register.
- bool parent_feature_available = false;
- for (Feature* parent = api_feature_provider->GetParent(feature);
- parent != NULL; parent = api_feature_provider->GetParent(parent)) {
- if (context->IsAnyFeatureAvailableToContext(*parent)) {
- parent_feature_available = true;
- break;
- }
- }
- if (parent_feature_available)
+ // If this API has a parent feature (and isn't marked 'noparent'),
+ // then this must be a function or event, so we should not register.
+ if (api_feature_provider->GetParent(feature) != NULL)
continue;
if (context->IsAnyFeatureAvailableToContext(*feature))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698