From 1166ab3f3b882af3873099103fc2fbf577cd3a72 Mon Sep 17 00:00:00 2001 From: rob Date: Mon, 29 Feb 2016 12:26:02 -0800 Subject: Classify extension frames as extensions ScriptContextSet::GetExtensionFromFrameAndWorld did not return an Extension* for an extension frame if the origin is unique. This check was added in https://codereview.chromium.org/16625012/diff2/43001:57001/chrome/renderer/extensions/dispatcher.cc and already with a TODO to remove it. Now I'm removing the check because that CL did not show any valid reason for keeping it, and it's causing a bug. BUG=544182 TEST=./browser_tests --gtest_filter=ExtensionLoadingTest.RuntimeValidWhileDevToolsOpen Review URL: https://codereview.chromium.org/1746473002 Cr-Commit-Position: refs/heads/master@{#378257} --- extensions/renderer/script_context_set.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'extensions/renderer') diff --git a/extensions/renderer/script_context_set.cc b/extensions/renderer/script_context_set.cc index 84cf02d..18f367c 100644 --- a/extensions/renderer/script_context_set.cc +++ b/extensions/renderer/script_context_set.cc @@ -132,8 +132,7 @@ const Extension* ScriptContextSet::GetExtensionFromFrameAndWorld( if (world_id != 0) { // Isolated worlds (content script). extension_id = ScriptInjection::GetHostIdForIsolatedWorld(world_id); - } else if (!frame->document().securityOrigin().isUnique()) { - // TODO(kalman): Delete the above check. + } else { // Extension pages (chrome-extension:// URLs). GURL frame_url = ScriptContext::GetDataSourceURLForFrame(frame); frame_url = ScriptContext::GetEffectiveDocumentURL(frame, frame_url, -- cgit v1.1