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

Side by Side Diff: LayoutTests/crypto/resources/worker-infinite-loop-generateKey.js

Issue 263163006: Fix crash when ExecutionContext is torn down before a crypto operation has completed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix comment typo Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 importScripts('common.js');
2
3 function continuouslyGenerateRsaKey()
4 {
5 var extractable = false;
6 var usages = ['encrypt', 'decrypt'];
7 // Note that the modulus length is small.
8 var algorithm = {name: "RSAES-PKCS1-v1_5", modulusLength: 512, publicExponen t: hexStringToUint8Array("010001")};
9
10 return crypto.subtle.generateKey(algorithm, extractable, usages).then(functi on(result) {
11 // Infinite recursion intentional!
12 return continuouslyGenerateRsaKey();
13 });
14 }
15
16 // Starts a Promise which continually generates new RSA keys.
17 var unusedPromise = continuouslyGenerateRsaKey();
18
19 // Inform the outer script that the worker started.
20 postMessage("Worker started");
OLDNEW
« no previous file with comments | « LayoutTests/crypto/abandon-crypto-operation-expected.txt ('k') | Source/bindings/v8/ScriptPromiseResolverWithContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698