| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library _js_helper; | 5 library dart._js_helper; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'dart:_foreign_helper' show | 9 import 'dart:_foreign_helper' show |
| 10 JS, | 10 JS, |
| 11 JS_STRING_CONCAT; | 11 JS_STRING_CONCAT; |
| 12 | 12 |
| 13 import 'dart:_interceptors'; | 13 import 'dart:_interceptors'; |
| 14 | 14 |
| 15 part 'annotations.dart'; | 15 part 'annotations.dart'; |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 int random64() { | 769 int random64() { |
| 770 // TODO(lrn): Use a secure random source. | 770 // TODO(lrn): Use a secure random source. |
| 771 int int32a = JS("int", "(Math.random() * 0x100000000) >>> 0"); | 771 int int32a = JS("int", "(Math.random() * 0x100000000) >>> 0"); |
| 772 int int32b = JS("int", "(Math.random() * 0x100000000) >>> 0"); | 772 int int32b = JS("int", "(Math.random() * 0x100000000) >>> 0"); |
| 773 return int32a + int32b * 0x100000000; | 773 return int32a + int32b * 0x100000000; |
| 774 } | 774 } |
| 775 | 775 |
| 776 String jsonEncodeNative(String string) { | 776 String jsonEncodeNative(String string) { |
| 777 return JS("String", "JSON.stringify(#)", string); | 777 return JS("String", "JSON.stringify(#)", string); |
| 778 } | 778 } |
| OLD | NEW |