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

Issue 16820007: Expose crypto.getRandomValues() to workers. (Closed)

Created:
7 years, 6 months ago by eroman
Modified:
7 years, 6 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, loislo+blink_chromium.org, jsbell+bindings_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, marja+watch_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin, jeez, Ryan Sleevi
Visibility:
Public.

Description

Expose crypto.getRandomValues() to workers. It is only available to workers when the "Crypto" runtime feature is on. ----------------------- Testing details ----------------------- * Duplicated all existing tests for crypto.getRandomValues(). In addition to the original flavor, there is now a version of the test that runs on a worker. * Removed the 'crypto-' prefix from existing tests. This was redundant, as the path already includes 'crypto/'. * Added a completely new test: 'worker-random-values-concurrent.html'. This makes sure that calling getRandomValues() concurrently on workers isn't a problem. BUG=245025, 142173 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=152389

Patch Set 1 #

Total comments: 3

Patch Set 2 : Rebase and add concurrency test #

Patch Set 3 : Remove RandomSource.idl -- instead duplicate getRandomValues for workers #

Patch Set 4 : Fixup some whitespace #

Patch Set 5 : Rebase on master #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+321 lines, -322 lines) Patch
D LayoutTests/crypto/crypto-random-values.html View 1 1 chunk +0 lines, -46 lines 0 comments Download
D LayoutTests/crypto/crypto-random-values-expected.txt View 1 1 chunk +0 lines, -12 lines 0 comments Download
D LayoutTests/crypto/crypto-random-values-limits.html View 1 1 chunk +0 lines, -33 lines 0 comments Download
D LayoutTests/crypto/crypto-random-values-limits-expected.txt View 1 1 chunk +0 lines, -13 lines 0 comments Download
D LayoutTests/crypto/crypto-random-values-types.html View 1 1 chunk +0 lines, -56 lines 0 comments Download
D LayoutTests/crypto/crypto-random-values-types-expected.txt View 1 1 chunk +0 lines, -52 lines 0 comments Download
A + LayoutTests/crypto/random-values.html View 1 2 2 chunks +4 lines, -1 line 0 comments Download
A + LayoutTests/crypto/random-values-expected.txt View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
A + LayoutTests/crypto/random-values-limits.html View 1 2 2 chunks +4 lines, -1 line 0 comments Download
A + LayoutTests/crypto/random-values-limits-expected.txt View 1 1 chunk +2 lines, -2 lines 0 comments Download
A + LayoutTests/crypto/random-values-types.html View 1 2 2 chunks +4 lines, -1 line 0 comments Download
A + LayoutTests/crypto/random-values-types-expected.txt View 1 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/crypto/resources/random-values.js View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
A LayoutTests/crypto/resources/random-values-concurrent.js View 1 1 chunk +4 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/resources/random-values-limits.js View 1 2 2 chunks +7 lines, -18 lines 0 comments Download
A + LayoutTests/crypto/resources/random-values-types.js View 1 2 2 chunks +7 lines, -18 lines 0 comments Download
A + LayoutTests/crypto/worker-random-values.html View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
A LayoutTests/crypto/worker-random-values-concurrent.html View 1 1 chunk +61 lines, -0 lines 0 comments Download
A LayoutTests/crypto/worker-random-values-concurrent-expected.txt View 1 1 chunk +19 lines, -0 lines 0 comments Download
A LayoutTests/crypto/worker-random-values-expected.txt View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/worker-random-values-limits.html View 1 2 2 chunks +4 lines, -1 line 0 comments Download
A LayoutTests/crypto/worker-random-values-limits-expected.txt View 1 chunk +14 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/worker-random-values-types.html View 1 2 2 chunks +4 lines, -1 line 0 comments Download
A LayoutTests/crypto/worker-random-values-types-expected.txt View 1 chunk +53 lines, -0 lines 0 comments Download
M Source/bindings/bindings.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
D Source/bindings/v8/custom/V8CryptoCustom.cpp View 1 2 2 chunks +4 lines, -2 lines 1 comment Download
A + Source/bindings/v8/custom/V8WorkerCryptoCustom.cpp View 1 2 1 chunk +5 lines, -6 lines 0 comments Download
M Source/modules/crypto/Crypto.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/crypto/Crypto.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A + Source/modules/crypto/WorkerContextCrypto.h View 1 2 1 chunk +12 lines, -13 lines 0 comments Download
A + Source/modules/crypto/WorkerContextCrypto.cpp View 1 2 1 chunk +16 lines, -18 lines 0 comments Download
A + Source/modules/crypto/WorkerContextCrypto.idl View 1 2 3 1 chunk +2 lines, -5 lines 0 comments Download
A + Source/modules/crypto/WorkerCrypto.h View 1 2 1 chunk +13 lines, -8 lines 0 comments Download
A + Source/modules/crypto/WorkerCrypto.cpp View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
A + Source/modules/crypto/WorkerCrypto.idl View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M Source/wtf/CryptographicallyRandomNumber.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Ryan Sleevi
https://codereview.chromium.org/16820007/diff/1/Source/modules/crypto/RandomSource.idl File Source/modules/crypto/RandomSource.idl (right): https://codereview.chromium.org/16820007/diff/1/Source/modules/crypto/RandomSource.idl#newcode36 Source/modules/crypto/RandomSource.idl:36: // Web Crypto API spec. comment updates needed
7 years, 6 months ago (2013-06-12 21:57:15 UTC) #1
eroman
https://codereview.chromium.org/16820007/diff/1/Source/modules/crypto/RandomSource.idl File Source/modules/crypto/RandomSource.idl (right): https://codereview.chromium.org/16820007/diff/1/Source/modules/crypto/RandomSource.idl#newcode36 Source/modules/crypto/RandomSource.idl:36: // Web Crypto API spec. On 2013/06/12 21:57:15, Ryan ...
7 years, 6 months ago (2013-06-12 22:00:00 UTC) #2
abarth-chromium
This CL looks good. My one concern is whether you intend the change below. In ...
7 years, 6 months ago (2013-06-12 23:18:16 UTC) #3
eroman
Thanks Adam, this CL is still a work in progress (hadn't intended to publish it ...
7 years, 6 months ago (2013-06-12 23:33:32 UTC) #4
abarth-chromium
On 2013/06/12 23:33:32, eroman wrote: > Thanks Adam, this CL is still a work in ...
7 years, 6 months ago (2013-06-12 23:39:57 UTC) #5
eroman
Many thanks Adam for pointing out the __proto__ issue! I have confirmed that my translation ...
7 years, 6 months ago (2013-06-13 00:50:23 UTC) #6
eroman
PTAL. * Removed RandomSource.idl and the interface inheritance. (Instead introduced WorkerCrypto). * Added 'worker-random-values-concurrent.html' test ...
7 years, 6 months ago (2013-06-13 21:39:00 UTC) #7
abarth-chromium
lgtm https://codereview.chromium.org/16820007/diff/20001/Source/bindings/v8/custom/V8CryptoCustom.cpp File Source/bindings/v8/custom/V8CryptoCustom.cpp (right): https://codereview.chromium.org/16820007/diff/20001/Source/bindings/v8/custom/V8CryptoCustom.cpp#newcode40 Source/bindings/v8/custom/V8CryptoCustom.cpp:40: // * Must be threadsafe It's too bad ...
7 years, 6 months ago (2013-06-13 21:48:33 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/16820007/20001
7 years, 6 months ago (2013-06-13 21:53:34 UTC) #9
commit-bot: I haz the power
7 years, 6 months ago (2013-06-13 23:17:14 UTC) #10
Message was sent while issue was closed.
Change committed as 152389

Powered by Google App Engine
This is Rietveld 408576698