| Index: chrome/renderer/extensions/extension_dispatcher.cc
|
| diff --git a/chrome/renderer/extensions/extension_dispatcher.cc b/chrome/renderer/extensions/extension_dispatcher.cc
|
| index 23c57e46c3f9e365fbdd7f291a281bea697cb7b0..5020ff1caea8cfaf18295ddd75ad08941e8608f2 100644
|
| --- a/chrome/renderer/extensions/extension_dispatcher.cc
|
| +++ b/chrome/renderer/extensions/extension_dispatcher.cc
|
| @@ -329,15 +329,12 @@ bool ExtensionDispatcher::AllowScriptExtension(
|
| std::string extension_id = GetExtensionID(frame, world_id);
|
| const Extension* extension = extensions_.GetByID(extension_id);
|
| if (!extension) {
|
| - // This can happen when a resource is blocked due to CSP; a valid
|
| - // chrome-extension:// URL is navigated to, so it passes the initial
|
| - // checks, but the URL gets changed to "chrome-extension://invalid"
|
| - // afterwards (see chrome_content_renderer_client.cc). An extension
|
| - // page still gets loaded, just for the extension with ID "invalid",
|
| - // which of course isn't found so GetById extension will be NULL.
|
| - //
|
| - // Reference: http://crbug.com/111614.
|
| - CHECK_EQ("invalid", extension_id);
|
| + if (extension_id != "invalid") {
|
| + // Ignore "invalid" because CSP blocks extension page loading by
|
| + // switching the extension ID to "invalid". This isn't interesting.
|
| + LOG(ERROR) << "Extension \"" << extension_id << "\" not found";
|
| + RenderThread::Get()->RecordUserMetrics("ExtensionNotFound_ED");
|
| + }
|
| return false;
|
| }
|
| return util::AllowAPIInjection(custom_binding_api_name, *extension, this);
|
|
|