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

Unified Diff: pkg/dev_compiler/tool/input_sdk/lib/html/html_common/conversions_dart2js.dart

Issue 2752163002: Format all dart dev compiler files (Closed)
Patch Set: 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
Index: pkg/dev_compiler/tool/input_sdk/lib/html/html_common/conversions_dart2js.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/lib/html/html_common/conversions_dart2js.dart b/pkg/dev_compiler/tool/input_sdk/lib/html/html_common/conversions_dart2js.dart
index 3cab3802cc09c358825f56c1437389af77933e79..0f146d735a03996e3398d9255891e03ee47712e0 100644
--- a/pkg/dev_compiler/tool/input_sdk/lib/html/html_common/conversions_dart2js.dart
+++ b/pkg/dev_compiler/tool/input_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 {
-
List newJsList(length) => JS('JSExtendableArray', 'new Array(#)', length);
List newDartList(length) => newJsList(length);
bool identicalInJs(a, b) => identical(a, b);
void forEachJsField(object, action(key, value)) {
- 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,7 +88,8 @@ 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;
}

Powered by Google App Engine
This is Rietveld 408576698