Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Issue 2243323002: [Extensions] Don't inject mojo bindings for every context (Closed)

Created:
4 years, 4 months ago by Devlin
Modified:
4 years, 4 months ago
Reviewers:
haraken, lazyboy
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Don't inject mojo bindings for every context Currently, the module system injects mojo bindings for every created script context, because some extension APIs rely on their existence. However, these bindings are slow and costly to construct. Only create them for blessed extension contexts. We should be able to drill this down further and create them even more rarely, but do this until we can investigate more, since this helps in the 99% case. BUG=637155 Committed: https://crrev.com/3cf02f522b6428e4bd30ac55da07657a3e55072c Cr-Commit-Position: refs/heads/master@{#412086}

Patch Set 1 : todo #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M extensions/renderer/module_system.cc View 1 chunk +6 lines, -1 line 2 comments Download

Messages

Total messages: 27 (19 generated)
Devlin
4 years, 4 months ago (2016-08-15 22:06:21 UTC) #15
lazyboy
lgtm.
4 years, 4 months ago (2016-08-15 22:19:13 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2243323002/40001
4 years, 4 months ago (2016-08-15 22:21:49 UTC) #19
commit-bot: I haz the power
Committed patchset #1 (id:40001)
4 years, 4 months ago (2016-08-15 23:12:54 UTC) #21
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/3cf02f522b6428e4bd30ac55da07657a3e55072c Cr-Commit-Position: refs/heads/master@{#412086}
4 years, 4 months ago (2016-08-15 23:14:18 UTC) #23
haraken
https://codereview.chromium.org/2243323002/diff/40001/extensions/renderer/module_system.cc File extensions/renderer/module_system.cc (right): https://codereview.chromium.org/2243323002/diff/40001/extensions/renderer/module_system.cc#newcode177 extensions/renderer/module_system.cc:177: context_->context_type() == Feature::BLESSED_EXTENSION_CONTEXT) { Does this mean that we ...
4 years, 4 months ago (2016-08-18 01:42:59 UTC) #25
Devlin
https://codereview.chromium.org/2243323002/diff/40001/extensions/renderer/module_system.cc File extensions/renderer/module_system.cc (right): https://codereview.chromium.org/2243323002/diff/40001/extensions/renderer/module_system.cc#newcode177 extensions/renderer/module_system.cc:177: context_->context_type() == Feature::BLESSED_EXTENSION_CONTEXT) { On 2016/08/18 01:42:59, haraken wrote: ...
4 years, 4 months ago (2016-08-18 02:01:36 UTC) #26
haraken
4 years, 4 months ago (2016-08-18 02:04:51 UTC) #27
Message was sent while issue was closed.
On 2016/08/18 02:01:36, Devlin wrote:
>
https://codereview.chromium.org/2243323002/diff/40001/extensions/renderer/mod...
> File extensions/renderer/module_system.cc (right):
> 
>
https://codereview.chromium.org/2243323002/diff/40001/extensions/renderer/mod...
> extensions/renderer/module_system.cc:177: context_->context_type() ==
> Feature::BLESSED_EXTENSION_CONTEXT) {
> On 2016/08/18 01:42:59, haraken wrote:
> > 
> > Does this mean that we don't inject mojo bindings for the main world (in the
> > Blink terms)?
> 
> This means we only inject bindings for extension frames.  So if you visit a
> chrome-extension:// page, that main frame will get bindings, but for the 99.9%
> of other traffic, there are no bindings (for the main frame or any js worlds).

> With site isolation, extension iframes are considered blessed extension
> contexts, so they will get bindings, but again, that's fairly rare.

Ah, thanks for the clarification!

Powered by Google App Engine
This is Rietveld 408576698