Index: extensions/renderer/script_context.cc |
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc |
index 6a5b631179035859e3b0e53ea7a4cbaef968cac0..28407ab1012315a0f9fa71990675da2ddd344107 100644 |
--- a/extensions/renderer/script_context.cc |
+++ b/extensions/renderer/script_context.cc |
@@ -255,8 +255,13 @@ std::string ScriptContext::GetEffectiveContextTypeDescription() const { |
bool ScriptContext::IsAnyFeatureAvailableToContext(const Feature& api) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
+ // TODO(lazyboy): Decide what we should do for SERVICE_WORKER_CONTEXT. |
+ GURL url = url_; |
Devlin
2016/04/13 19:46:32
ternary?
lazyboy
2016/04/14 02:07:53
Done.
|
+ if (context_type() != Feature::SERVICE_WORKER_CONTEXT) |
+ url = GetDataSourceURLForFrame(web_frame()); |
+ |
return ExtensionAPI::GetSharedInstance()->IsAnyFeatureAvailableToContext( |
- api, extension(), context_type(), GetDataSourceURLForFrame(web_frame())); |
+ api, extension(), context_type(), url); |
} |
// static |