Commit 4f8f50d2 authored by lfg's avatar lfg Committed by Commit bot

Verify that ComponentExtensionResourceManager exists before using it.

App_shell doesn't have a ComponentExtensionResourceManager implementation, so we need to check if it's available before using it.

BUG=352293

Review URL: https://codereview.chromium.org/615703002

Cr-Commit-Position: refs/heads/master@{#297299}
parent e65fb36c
......@@ -206,9 +206,11 @@ bool ExecuteCodeFunction::RunAsync() {
}
int resource_id;
if (ExtensionsBrowserClient::Get()
->GetComponentExtensionResourceManager()
->IsComponentExtensionResource(resource_.extension_root(),
ComponentExtensionResourceManager* component_extension_resource_manager =
ExtensionsBrowserClient::Get()->GetComponentExtensionResourceManager();
if (component_extension_resource_manager &&
component_extension_resource_manager->IsComponentExtensionResource(
resource_.extension_root(),
resource_.relative_path(),
&resource_id)) {
const ResourceBundle& rb = ResourceBundle::GetSharedInstance();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment