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

Issue 233733004: [webcrypto] Make operations run on worker threads. (Closed)

Created:
6 years, 8 months ago by eroman
Modified:
6 years, 7 months ago
Reviewers:
Ryan Sleevi
CC:
chromium-reviews, darin-cc_chromium.org, jam
Visibility:
Public.

Description

[webcrypto] Make operations run on a background thread so they don't block the blink thread. More details on threading strategy provided in webcrypto_impl.cc. BUG=245025

Patch Set 1 : #

Patch Set 2 : Use a SequencedWorkerPool rather than dedicated thread. #

Patch Set 3 : Fix compile #

Patch Set 4 : Fix a crash (RSA-OAEP keys not supported) #

Total comments: 33

Patch Set 5 : Address sleevi comments #

Total comments: 23

Patch Set 6 : Address sleevi comments #

Patch Set 7 : moar comment changes #

Patch Set 8 : rebase again #

Total comments: 1

Patch Set 9 : Update comment to reflect upcoming threadsafety of WebCryptoResult #

Patch Set 10 : Rebase #

Patch Set 11 : make compile #

Patch Set 12 : oops, fixup after rebase #

Patch Set 13 : Re-upload following the revert #

Patch Set 14 : Fix argument ordering bug #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1048 lines, -391 lines) Patch
M content/child/webcrypto/jwk.h View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M content/child/webcrypto/jwk.cc View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -11 lines 0 comments Download
M content/child/webcrypto/platform_crypto.h View 1 2 3 4 5 12 chunks +47 lines, -14 lines 0 comments Download
M content/child/webcrypto/platform_crypto_nss.cc View 1 2 3 4 5 6 7 8 9 49 chunks +163 lines, -78 lines 0 comments Download
M content/child/webcrypto/platform_crypto_openssl.cc View 1 2 3 4 5 6 7 8 9 17 chunks +41 lines, -33 lines 0 comments Download
M content/child/webcrypto/shared_crypto.h View 1 2 3 4 7 chunks +24 lines, -19 lines 0 comments Download
M content/child/webcrypto/shared_crypto.cc View 1 2 3 4 5 6 7 8 9 26 chunks +69 lines, -53 lines 0 comments Download
M content/child/webcrypto/shared_crypto_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +128 lines, -5 lines 0 comments Download
M content/child/webcrypto/status.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M content/child/webcrypto/webcrypto_impl.h View 1 2 3 4 2 chunks +2 lines, -7 lines 0 comments Download
M content/child/webcrypto/webcrypto_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +552 lines, -139 lines 2 comments Download
M content/child/webcrypto/webcrypto_util.h View 2 chunks +1 line, -10 lines 0 comments Download
M content/child/webcrypto/webcrypto_util.cc View 1 chunk +4 lines, -19 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
eroman
6 years, 8 months ago (2014-04-17 19:53:41 UTC) #1
Ryan Sleevi
https://codereview.chromium.org/233733004/diff/120001/content/child/webcrypto/platform_crypto.h File content/child/webcrypto/platform_crypto.h (right): https://codereview.chromium.org/233733004/diff/120001/content/child/webcrypto/platform_crypto.h#newcode18 content/child/webcrypto/platform_crypto.h:18: } Is it legal to template forward declare like ...
6 years, 8 months ago (2014-04-18 00:51:26 UTC) #2
eroman
https://codereview.chromium.org/233733004/diff/120001/content/child/webcrypto/platform_crypto.h File content/child/webcrypto/platform_crypto.h (right): https://codereview.chromium.org/233733004/diff/120001/content/child/webcrypto/platform_crypto.h#newcode18 content/child/webcrypto/platform_crypto.h:18: } On 2014/04/18 00:51:26, Ryan Sleevi wrote: > Is ...
6 years, 8 months ago (2014-04-18 18:45:56 UTC) #3
eroman
https://codereview.chromium.org/233733004/diff/120001/content/child/webcrypto/webcrypto_impl.h File content/child/webcrypto/webcrypto_impl.h (left): https://codereview.chromium.org/233733004/diff/120001/content/child/webcrypto/webcrypto_impl.h#oldcode85 content/child/webcrypto/webcrypto_impl.h:85: blink::WebArrayBuffer& result); On 2014/04/18 18:45:56, eroman wrote: > On ...
6 years, 8 months ago (2014-04-18 20:02:27 UTC) #4
Ryan Sleevi
https://codereview.chromium.org/233733004/diff/140001/content/child/webcrypto/jwk.cc File content/child/webcrypto/jwk.cc (right): https://codereview.chromium.org/233733004/diff/140001/content/child/webcrypto/jwk.cc#newcode4 content/child/webcrypto/jwk.cc:4: IWYU - why aren't you #including "content/child/webcrypto/jwk.h" first and ...
6 years, 8 months ago (2014-04-24 02:10:40 UTC) #5
eroman
https://codereview.chromium.org/233733004/diff/140001/content/child/webcrypto/jwk.cc File content/child/webcrypto/jwk.cc (right): https://codereview.chromium.org/233733004/diff/140001/content/child/webcrypto/jwk.cc#newcode4 content/child/webcrypto/jwk.cc:4: On 2014/04/24 02:10:41, Ryan Sleevi wrote: > IWYU - ...
6 years, 8 months ago (2014-04-24 20:59:37 UTC) #6
Ryan Sleevi
Having better understood the raciness issue (http://crbug.com/366840), I feel like we should hold off landing ...
6 years, 8 months ago (2014-04-25 23:19:02 UTC) #7
eroman
I am about to land a fix in Blink for that: https://codereview.chromium.org/253563002/ So I will ...
6 years, 8 months ago (2014-04-25 23:43:30 UTC) #8
eroman
OK the TODO is gone, as the issue I was documenting will be resolved before ...
6 years, 8 months ago (2014-04-26 00:32:06 UTC) #9
Ryan Sleevi
lgtm
6 years, 8 months ago (2014-04-26 00:37:39 UTC) #10
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 7 months ago (2014-04-28 16:40:42 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/233733004/240001
6 years, 7 months ago (2014-04-28 16:41:02 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 17:04:12 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on android_dbg
6 years, 7 months ago (2014-04-28 17:04:12 UTC) #14
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 7 months ago (2014-04-28 18:00:48 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/233733004/240001
6 years, 7 months ago (2014-04-28 18:02:21 UTC) #16
eroman
The CQ bit was unchecked by eroman@chromium.org
6 years, 7 months ago (2014-04-28 19:27:47 UTC) #17
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 7 months ago (2014-04-28 20:01:44 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/233733004/280001
6 years, 7 months ago (2014-04-28 20:01:59 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 20:09:06 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_clang_dbg
6 years, 7 months ago (2014-04-28 20:09:07 UTC) #21
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 7 months ago (2014-04-28 20:12:07 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/233733004/300001
6 years, 7 months ago (2014-04-28 20:12:47 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 20:17:12 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 7 months ago (2014-04-28 20:17:12 UTC) #25
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 7 months ago (2014-04-28 20:18:43 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/233733004/300001
6 years, 7 months ago (2014-04-28 20:20:44 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 20:23:06 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_clang_dbg tryserver.chromium on linux_chromium_rel
6 years, 7 months ago (2014-04-28 20:23:06 UTC) #29
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 7 months ago (2014-04-28 23:11:56 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/233733004/310001
6 years, 7 months ago (2014-04-28 23:12:34 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 23:58:16 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_rel
6 years, 7 months ago (2014-04-28 23:58:17 UTC) #33
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 7 months ago (2014-04-29 00:47:22 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/233733004/310001
6 years, 7 months ago (2014-04-29 00:48:00 UTC) #35
commit-bot: I haz the power
Change committed as 266798
6 years, 7 months ago (2014-04-29 09:13:54 UTC) #36
jsbell
On 2014/04/29 09:13:54, I haz the power (commit-bot) wrote: > Change committed as 266798 Reverted ...
6 years, 7 months ago (2014-04-29 16:59:46 UTC) #37
eroman
NOTE: There was a bug in this changelist and it has been reverted. The bug ...
6 years, 7 months ago (2014-04-29 18:13:54 UTC) #38
eroman
PTAL at the changes between patchset 13 and 14
6 years, 7 months ago (2014-04-29 20:05:30 UTC) #39
Ryan Sleevi
On 2014/04/29 20:05:30, eroman wrote: > PTAL at the changes between patchset 13 and 14 ...
6 years, 7 months ago (2014-04-29 20:12:45 UTC) #40
Ryan Sleevi
https://codereview.chromium.org/233733004/diff/350001/content/child/webcrypto/webcrypto_impl.cc File content/child/webcrypto/webcrypto_impl.cc (right): https://codereview.chromium.org/233733004/diff/350001/content/child/webcrypto/webcrypto_impl.cc#newcode165 content/child/webcrypto/webcrypto_impl.cc:165: } Not LGTM. I don't like this co-opting of ...
6 years, 7 months ago (2014-04-29 20:15:59 UTC) #41
eroman
6 years, 7 months ago (2014-04-29 22:24:51 UTC) #42
https://codereview.chromium.org/233733004/diff/350001/content/child/webcrypto...
File content/child/webcrypto/webcrypto_impl.cc (right):

https://codereview.chromium.org/233733004/diff/350001/content/child/webcrypto...
content/child/webcrypto/webcrypto_impl.cc:165: }
On 2014/04/29 20:16:00, Ryan Sleevi wrote:
> Not LGTM. I don't like this co-opting of function pointers and templates.
> 
> You could just as easily have updated your code to use
> 
> void SomeFoo(scoped_ptr<State> passed_state) {
>   State* state = passed_state.get();
>   state->stuff;
>   state->someotherstuff;
>   state->result->PostTask(..., Passed(&passed_state));
> }
> 
> Regardless of the .Pass()/Passed(), State* itself will remain both valid and
> pointing to the same object, regardless of which scoped_ptr owns it.

Ok I can do that. I thought the new way was superior in that it saves redundancy
(with error handling and posting of tasks).

Powered by Google App Engine
This is Rietveld 408576698