Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1138)

Issue 878513005: Extensions: suspend extension's scripts when V8 is paused (Closed)

Created:
5 years, 10 months ago by kozy
Modified:
5 years, 9 months ago
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: suspend extension's scripts when V8 is paused This CL replaced sync script execution API with async. Async API suspends extension's scripts when V8 is paused at breakpoint or when nested event loop is running for modal dialogs otherwise scripts are executed synchronously. API provides guarantees of execution order (first in - first execute, per frame). BUG=410289 R=vsevik@chromium.org Committed: https://crrev.com/c8bc9a58dc08a98fe889c269b680ead30558d372 Cr-Commit-Position: refs/heads/master@{#319425}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : rebased #

Total comments: 2

Patch Set 5 : check added #

Total comments: 4

Patch Set 6 : #

Patch Set 7 : Fixed ActivityLogPrerenderTest.TestScriptInjected #

Total comments: 10

Patch Set 8 : Addressed comments #

Total comments: 56

Patch Set 9 : #

Total comments: 26

Patch Set 10 : Addressed comments #

Total comments: 12

Patch Set 11 #

Total comments: 2

Patch Set 12 : #

Total comments: 10

Patch Set 13 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+333 lines, -163 lines) Patch
M extensions/extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/renderer/programmatic_script_injector.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/programmatic_script_injector.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -1 line 0 comments Download
M extensions/renderer/script_injection.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +52 lines, -14 lines 0 comments Download
M extensions/renderer/script_injection.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +86 lines, -54 lines 0 comments Download
A extensions/renderer/script_injection_callback.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +42 lines, -0 lines 0 comments Download
A extensions/renderer/script_injection_callback.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +27 lines, -0 lines 0 comments Download
M extensions/renderer/script_injection_manager.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +11 lines, -10 lines 0 comments Download
M extensions/renderer/script_injection_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +51 lines, -75 lines 0 comments Download
M extensions/renderer/script_injector.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -1 line 0 comments Download
M extensions/renderer/scripts_run_info.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/renderer/scripts_run_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +15 lines, -3 lines 0 comments Download
M extensions/renderer/user_script_injector.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/user_script_injector.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -3 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 3 chunks +24 lines, -0 lines 2 comments Download

Messages

Total messages: 49 (10 generated)
kozy
Vsevolod, please take a look!
5 years, 10 months ago (2015-02-03 12:56:31 UTC) #1
kozy
CL depends on https://codereview.chromium.org/869513004/. Vsevolod, please take a look!
5 years, 10 months ago (2015-02-04 12:02:02 UTC) #2
kozy
Vsevolod, friendly ping!
5 years, 10 months ago (2015-02-06 12:36:57 UTC) #3
vsevik
Looks good, please make sure someone more familiar with extensions confirms that 1) scripts_run_info.LogRun call ...
5 years, 10 months ago (2015-02-06 14:33:44 UTC) #4
vsevik
https://codereview.chromium.org/878513005/diff/60001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/878513005/diff/60001/extensions/renderer/script_injection.cc#newcode335 extensions/renderer/script_injection.cc:335: if (script_injection_manager_) { This seems impossible, assert instead?
5 years, 10 months ago (2015-02-06 14:33:52 UTC) #5
kozy
https://codereview.chromium.org/878513005/diff/60001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/878513005/diff/60001/extensions/renderer/script_injection.cc#newcode335 extensions/renderer/script_injection.cc:335: if (script_injection_manager_) { On 2015/02/06 14:33:52, vsevik wrote: > ...
5 years, 10 months ago (2015-02-06 17:14:46 UTC) #6
kozy
@kalman, please take a look.
5 years, 10 months ago (2015-02-09 08:34:18 UTC) #8
not at google - send to devlin
Devlin is a better reviewer than me.
5 years, 10 months ago (2015-02-10 22:53:44 UTC) #10
Devlin
On 2015/02/10 22:53:44, kalman wrote: > Devlin is a better reviewer than me. Can you ...
5 years, 10 months ago (2015-02-10 23:26:04 UTC) #11
kozy
On 2015/02/10 23:26:04, Devlin wrote: > On 2015/02/10 22:53:44, kalman wrote: > > Devlin is ...
5 years, 10 months ago (2015-02-11 09:04:13 UTC) #12
kozy
On 2015/02/11 09:04:13, kozyatinskiy wrote: > On 2015/02/10 23:26:04, Devlin wrote: > > On 2015/02/10 ...
5 years, 10 months ago (2015-02-11 10:28:46 UTC) #13
kozy
On 2015/02/11 10:28:46, kozyatinskiy wrote: > On 2015/02/11 09:04:13, kozyatinskiy wrote: > > On 2015/02/10 ...
5 years, 10 months ago (2015-02-11 10:34:29 UTC) #14
Devlin
First off, a few bigger items. Also, is the page subject to the same restrictions ...
5 years, 10 months ago (2015-02-11 17:49:58 UTC) #15
kozy
On 2015/02/11 17:49:58, Devlin wrote: > First off, a few bigger items. Also, is the ...
5 years, 10 months ago (2015-02-16 16:57:29 UTC) #16
kozy
Friendly ping.
5 years, 10 months ago (2015-02-19 14:15:39 UTC) #17
Devlin
https://codereview.chromium.org/878513005/diff/80001/extensions/renderer/script_injection_manager.cc File extensions/renderer/script_injection_manager.cc (left): https://codereview.chromium.org/878513005/diff/80001/extensions/renderer/script_injection_manager.cc#oldcode372 extensions/renderer/script_injection_manager.cc:372: ScriptsRunInfo scripts_run_info; On 2015/02/11 17:49:58, Devlin wrote: > Having ...
5 years, 10 months ago (2015-02-19 17:13:01 UTC) #18
kozy
On 2015/02/19 17:13:01, Devlin wrote: > https://codereview.chromium.org/878513005/diff/80001/extensions/renderer/script_injection_manager.cc > File extensions/renderer/script_injection_manager.cc (left): > > https://codereview.chromium.org/878513005/diff/80001/extensions/renderer/script_injection_manager.cc#oldcode372 > ...
5 years, 10 months ago (2015-02-20 16:49:25 UTC) #21
Devlin
On 2015/02/20 16:49:25, kozyatinskiy wrote: > On 2015/02/19 17:13:01, Devlin wrote: > > > https://codereview.chromium.org/878513005/diff/80001/extensions/renderer/script_injection_manager.cc ...
5 years, 10 months ago (2015-02-20 22:21:47 UTC) #22
kozy
On 2015/02/20 22:21:47, Devlin wrote: > On 2015/02/20 16:49:25, kozyatinskiy wrote: > > On 2015/02/19 ...
5 years, 10 months ago (2015-02-25 11:40:46 UTC) #23
Devlin
https://codereview.chromium.org/878513005/diff/140001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/878513005/diff/140001/extensions/renderer/script_injection.cc#newcode289 extensions/renderer/script_injection.cc:289: std::map<blink::WebLocalFrame*, size_t>::iterator it = We actually make no guarantees ...
5 years, 10 months ago (2015-02-25 18:02:15 UTC) #24
kozy
Devlin, please take a look. https://codereview.chromium.org/878513005/diff/140001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/878513005/diff/140001/extensions/renderer/script_injection.cc#newcode289 extensions/renderer/script_injection.cc:289: std::map<blink::WebLocalFrame*, size_t>::iterator it = ...
5 years, 9 months ago (2015-02-27 17:32:28 UTC) #25
Devlin
Looks much better, overall! Thanks for making those changes. Now into the nitty-gritty. :) https://codereview.chromium.org/878513005/diff/140001/extensions/renderer/script_injection_manager.cc ...
5 years, 9 months ago (2015-02-27 18:25:33 UTC) #26
kozy
Thank you for great review! :) New version uploaded. Please take a look. https://codereview.chromium.org/878513005/diff/140001/extensions/renderer/script_injection_manager.cc File ...
5 years, 9 months ago (2015-02-28 15:23:23 UTC) #27
Devlin
https://codereview.chromium.org/878513005/diff/180001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/878513005/diff/180001/extensions/renderer/script_injection.cc#newcode264 extensions/renderer/script_injection.cc:264: new ScriptInjectionCallback(this, frame)); Is it at all possible for ...
5 years, 9 months ago (2015-03-03 00:34:10 UTC) #28
kozy
https://codereview.chromium.org/878513005/diff/180001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/878513005/diff/180001/extensions/renderer/script_injection.cc#newcode264 extensions/renderer/script_injection.cc:264: new ScriptInjectionCallback(this, frame)); On 2015/03/03 00:34:10, Devlin wrote: > ...
5 years, 9 months ago (2015-03-03 13:50:20 UTC) #29
Devlin
https://codereview.chromium.org/878513005/diff/200001/extensions/renderer/programmatic_script_injector.h File extensions/renderer/programmatic_script_injector.h (right): https://codereview.chromium.org/878513005/diff/200001/extensions/renderer/programmatic_script_injector.h#newcode52 extensions/renderer/programmatic_script_injector.h:52: nit: no newline here (group override methods from the ...
5 years, 9 months ago (2015-03-03 23:47:03 UTC) #30
kozy
https://codereview.chromium.org/878513005/diff/200001/extensions/renderer/programmatic_script_injector.h File extensions/renderer/programmatic_script_injector.h (right): https://codereview.chromium.org/878513005/diff/200001/extensions/renderer/programmatic_script_injector.h#newcode52 extensions/renderer/programmatic_script_injector.h:52: On 2015/03/03 23:47:02, Devlin wrote: > nit: no newline ...
5 years, 9 months ago (2015-03-04 08:55:08 UTC) #31
Devlin
lgtm with one final nit. :) https://codereview.chromium.org/878513005/diff/220001/extensions/renderer/scripts_run_info.cc File extensions/renderer/scripts_run_info.cc (right): https://codereview.chromium.org/878513005/diff/220001/extensions/renderer/scripts_run_info.cc#newcode41 extensions/renderer/scripts_run_info.cc:41: if ((num_css || ...
5 years, 9 months ago (2015-03-04 18:09:31 UTC) #32
kozy
@asvitkine, please take a look. I need owner lgtm for histograms.xml. https://codereview.chromium.org/878513005/diff/220001/extensions/renderer/scripts_run_info.cc File extensions/renderer/scripts_run_info.cc (right): ...
5 years, 9 months ago (2015-03-05 09:45:51 UTC) #34
Alexei Svitkine (slow)
+rkaplow, can you do the initial review for histograms in this CL? Thanks.
5 years, 9 months ago (2015-03-05 16:00:11 UTC) #36
Devlin
A few more last things (a few of which may have come from merge conflicts). ...
5 years, 9 months ago (2015-03-05 16:32:13 UTC) #37
kozy
https://codereview.chromium.org/878513005/diff/240001/extensions/renderer/script_injection.h File extensions/renderer/script_injection.h (right): https://codereview.chromium.org/878513005/diff/240001/extensions/renderer/script_injection.h#newcode60 extensions/renderer/script_injection.h:60: // NOTE: |injection_host| may be NULL, if the injection_host ...
5 years, 9 months ago (2015-03-05 21:41:37 UTC) #38
rkaplow
lgtm https://codereview.chromium.org/878513005/diff/260001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/878513005/diff/260001/tools/metrics/histograms/histograms.xml#oldcode8976 tools/metrics/histograms/histograms.xml:8976: </histogram> I will note that you can make ...
5 years, 9 months ago (2015-03-05 22:38:23 UTC) #39
rkaplow
will still need asvitkine@ to review.
5 years, 9 months ago (2015-03-05 22:38:49 UTC) #40
Alexei Svitkine (slow)
lgtm
5 years, 9 months ago (2015-03-05 22:50:18 UTC) #41
kozy
https://codereview.chromium.org/878513005/diff/260001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/878513005/diff/260001/tools/metrics/histograms/histograms.xml#oldcode8976 tools/metrics/histograms/histograms.xml:8976: </histogram> On 2015/03/05 22:38:23, rkaplow wrote: > I will ...
5 years, 9 months ago (2015-03-06 07:53:10 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/878513005/260001
5 years, 9 months ago (2015-03-06 07:56:08 UTC) #47
commit-bot: I haz the power
Committed patchset #13 (id:260001)
5 years, 9 months ago (2015-03-06 09:33:54 UTC) #48
commit-bot: I haz the power
5 years, 9 months ago (2015-03-06 09:34:46 UTC) #49
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/c8bc9a58dc08a98fe889c269b680ead30558d372
Cr-Commit-Position: refs/heads/master@{#319425}

Powered by Google App Engine
This is Rietveld 408576698