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

Unified Diff: sdk/lib/html/html_common/conversions_dart2js.dart

Issue 2754013002: Format all dart: library files (Closed)
Patch Set: Format all dart: library files Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/html_common/conversions.dart ('k') | sdk/lib/html/html_common/conversions_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/html_common/conversions_dart2js.dart
diff --git a/sdk/lib/html/html_common/conversions_dart2js.dart b/sdk/lib/html/html_common/conversions_dart2js.dart
index 15f9b2a86c7f751137dc53bb2d36dadbeb8f8fe5..0292cf5b198a68e3052ff4ebf2578bd788d7a848 100644
--- a/sdk/lib/html/html_common/conversions_dart2js.dart
+++ b/sdk/lib/html/html_common/conversions_dart2js.dart
@@ -20,12 +20,11 @@ convertDartToNative_Dictionary(Map dict, [void postCreate(dynamic)]) {
postCreate(object);
}
dict.forEach((String key, value) {
- JS('void', '#[#] = #', object, key, value);
- });
+ JS('void', '#[#] = #', object, key, value);
+ });
return object;
}
-
/**
* Ensures that the input is a JavaScript Array.
*
@@ -46,10 +45,12 @@ convertDartToNative_DateTime(DateTime date) {
}
convertDartToNative_PrepareForStructuredClone(value) =>
- new _StructuredCloneDart2Js().convertDartToNative_PrepareForStructuredClone(value);
+ new _StructuredCloneDart2Js()
+ .convertDartToNative_PrepareForStructuredClone(value);
convertNativeToDart_AcceptStructuredClone(object, {mustCopy: false}) =>
- new _AcceptStructuredCloneDart2Js().convertNativeToDart_AcceptStructuredClone(object, mustCopy: mustCopy);
+ new _AcceptStructuredCloneDart2Js()
+ .convertNativeToDart_AcceptStructuredClone(object, mustCopy: mustCopy);
class _StructuredCloneDart2Js extends _StructuredClone {
newJsMap() => JS('var', '{}');
@@ -59,15 +60,14 @@ class _StructuredCloneDart2Js extends _StructuredClone {
}
class _AcceptStructuredCloneDart2Js extends _AcceptStructuredClone {
-
newJsList(length) => JS('JSExtendableArray', 'new Array(#)', length);
newDartList(length) => newJsList(length);
identicalInJs(a, b) => identical(a, b);
void forEachJsField(object, action) {
- for (final key in JS('JSExtendableArray', 'Object.keys(#)', object)) {
- action(key, JS('var', '#[#]', object, key));
- }
+ for (final key in JS('JSExtendableArray', 'Object.keys(#)', object)) {
+ action(key, JS('var', '#[#]', object, key));
+ }
}
}
@@ -79,6 +79,7 @@ bool isJavaScriptSimpleObject(value) {
return JS('bool', '# === Object.prototype', proto) ||
JS('bool', '# === null', proto);
}
+
bool isImmutableJavaScriptArray(value) =>
JS('bool', r'!!(#.immutable$list)', value);
bool isJavaScriptPromise(value) =>
@@ -87,13 +88,13 @@ bool isJavaScriptPromise(value) =>
Future convertNativePromiseToDartFuture(promise) {
var completer = new Completer();
var then = convertDartClosureToJS((result) => completer.complete(result), 1);
- var error = convertDartClosureToJS((result) => completer.completeError(result), 1);
+ var error =
+ convertDartClosureToJS((result) => completer.completeError(result), 1);
var newPromise = JS('', '#.then(#)["catch"](#)', promise, then, error);
return completer.future;
}
-const String _serializedScriptValue =
- 'num|String|bool|'
+const String _serializedScriptValue = 'num|String|bool|'
'JSExtendableArray|=Object|'
'Blob|File|NativeByteBuffer|NativeTypedData'
// TODO(sra): Add Date, RegExp.
« no previous file with comments | « sdk/lib/html/html_common/conversions.dart ('k') | sdk/lib/html/html_common/conversions_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698