New issue
Advanced search Search tips

Issue 726022 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Extensions: Audit usages of Event broadcasting code.

Project Member Reported by lazyboy@chromium.org, May 24 2017

Issue description

1) Some events are constructed without browser_context through:
https://cs.chromium.org/chromium/src/extensions/browser/event_router.h?rcl=79fc0eff0e3bf95ad6a9759a49d9c837781440f8&l=394

2) And some events explicitly specify nullptr browser_context to dispatch events to incognito, e.g. downloads_api.cc:
  // The downloads system wants to share on-record events with off-record
  // extension renderers even in incognito_split_mode because that's how
  // chrome://downloads works. The "restrict_to_profile" mechanism does not
  // anticipate this, so it does not automatically prevent sharing off-record
  // events with on-record extension renderers.
  event->restrict_to_browser_context =
      (include_incognito && !profile_->IsOffTheRecord()) ? NULL : profile_;

Ideally, most events shouldn't need to broadcast events to all (including unrelated) browser_contexts. The common case would be 2), for this, we should introduce include_incognito param to a version of Event constructor.
 

Sign in to add a comment