Chromium Code Reviews| 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. |
|
not at google - send to devlin
2013/12/18 02:15:22
yak shave:
a check which would make me feel more
|
| + if (api_feature_provider->GetParent(feature) != NULL) |
| continue; |
| if (context->IsAnyFeatureAvailableToContext(*feature)) |