summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/extensions
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-18 01:02:38 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-18 01:02:38 +0000
commit25ec8f6027e4a2b004b226371136517b6b673077 (patch)
tree3948779e2f71b11e8b6e918a794aa26979b5a3ea /chrome/renderer/extensions
parenta558e8d49949e1aa5dd17d38d4c45e4a83f5cc1b (diff)
downloadchromium_src-25ec8f6027e4a2b004b226371136517b6b673077.zip
chromium_src-25ec8f6027e4a2b004b226371136517b6b673077.tar.gz
chromium_src-25ec8f6027e4a2b004b226371136517b6b673077.tar.bz2
Fix regression introduced by
http://src.chromium.org/viewvc/chrome?view=rev&revision=57788 Add a delegate interface so that chromium have more fine-grained control over whether a V8 extension is injected into a script context. This is the chromium-side change of webkit bug https://bugs.webkit.org/show_bug.cgi?id=45721 BUG=37290 TEST=covered by unit tests Review URL: http://codereview.chromium.org/3398001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/extensions')
-rw-r--r--chrome/renderer/extensions/event_bindings.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/chrome/renderer/extensions/event_bindings.cc b/chrome/renderer/extensions/event_bindings.cc
index 54edbb4..e0beb68 100644
--- a/chrome/renderer/extensions/event_bindings.cc
+++ b/chrome/renderer/extensions/event_bindings.cc
@@ -262,18 +262,11 @@ void EventBindings::HandleContextCreated(WebFrame* frame, bool content_script) {
GURL url = ds->request().url();
std::string extension_id = ExtensionRendererInfo::GetIdByURL(url);
- // Note: because process isolation doesn't work correcly with redirects,
- // it is possible that a page that IS in an extension process won't have
- // bindings setup for it, so we must also check IsExtensionProcess, otherwise
- // we'll attempt to invoke a JS function that doesn't exist.
- // Fixing crbug.com/53610 should fix this as well.
- RenderThread* current_thread = RenderThread::current();
- if ((!current_thread ||
- !current_thread->IsExtensionProcess() ||
- !ExtensionRendererInfo::ExtensionBindingsAllowed(url)) &&
+ if (!ExtensionRendererInfo::ExtensionBindingsAllowed(url) &&
!content_script) {
- // This context is a regular non-extension web page. Ignore it. We only
- // care about content scripts and extension frames.
+ // This context is a regular non-extension web page or an unprivileged
+ // chrome app. Ignore it. We only care about content scripts and extension
+ // frames.
// (Unless we're in unit tests, in which case we don't care what the URL
// is).
DCHECK(frame_context.IsEmpty() || frame_context == context);