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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

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:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 7bef67f625f66818dffa3ad863fbce92682c3a54..4983498edec900e99d976dbe893ba157b6ecd64c 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -2945,12 +2945,11 @@ class CredentialsContainer extends Interceptor {
@Experimental() // untriaged
Future _request_2() native;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable()
@DomName('Crypto')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@@ -2958,6 +2957,11 @@ class CredentialsContainer extends Interceptor {
// http://www.w3.org/TR/WebCryptoAPI/
@Native("Crypto")
class Crypto extends Interceptor {
+
+ TypedData getRandomValues(TypedData array) {
+ return _getRandomValues(array);
+ }
+
// To suppress missing implicit constructor warnings.
factory Crypto._() { throw new UnsupportedError("Not supported"); }
@@ -2969,11 +2973,13 @@ class Crypto extends Interceptor {
@Experimental() // untriaged
final _SubtleCrypto subtle;
+ @JSName('getRandomValues')
@DomName('Crypto.getRandomValues')
@DocsEditable()
@Creates('TypedData')
@Returns('TypedData|Null')
- TypedData getRandomValues(TypedData array) native;
+ TypedData _getRandomValues(TypedData array) native;
+
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698