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

Side by Side Diff: tools/dom/templates/html/impl/impl_Crypto.darttemplate

Issue 1387273002: Fix Crypto.getRandomValues to modify its argument, fix tests (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 part of $LIBRARYNAME;
6
7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
8
9 TypedData getRandomValues(TypedData array) {
10 $if DART2JS
11 return _getRandomValues(array);
12 $else
13 var random = _getRandomValues(array);
14 // The semantics of the operation are that it modifies the argument, but we
15 // have no way of making a Dart typed data created initially in Dart referen ce
16 // externalized storage. So we copy the values back from the returned copy.
17 // TODO(alanknight): Make this less ridiculously slow.
18 for (var i = 0; i < random.length; i++) {
19 array[i] = random[i];
20 }
21 return array;
22 $endif
23 }
24
25 $!MEMBERS
26 }
OLDNEW
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698