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

Side by Side Diff: sdk/lib/html/html_common/conversions_dartium.dart

Issue 1350903008: Fixed typo and test that passes and fails in checked mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged Created 5 years, 3 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 | « no previous file | tests/co19/co19-dartium.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of html_common; 1 part of html_common;
2 2
3 convertDartToNative_PrepareForStructuredClone(value) => 3 convertDartToNative_PrepareForStructuredClone(value) =>
4 new _StructuredCloneDartium().convertDartToNative_PrepareForStructuredClone( value); 4 new _StructuredCloneDartium().convertDartToNative_PrepareForStructuredClone( value);
5 5
6 convertNativeToDart_AcceptStructuredClone(object, {mustCopy: false}) => 6 convertNativeToDart_AcceptStructuredClone(object, {mustCopy: false}) =>
7 new _AcceptStructuredCloneDartium().convertNativeToDart_AcceptStructuredClon e(object, mustCopy: mustCopy); 7 new _AcceptStructuredCloneDartium().convertNativeToDart_AcceptStructuredClon e(object, mustCopy: mustCopy);
8 8
9 class _StructuredCloneDartium extends _StructuredClone { 9 class _StructuredCloneDartium extends _StructuredClone {
10 newJsMap() => new js.JsObject(js.context["Object"]); 10 newJsMap() => new js.JsObject(js.context["Object"]);
11 putIntoMap(map, key, value) => map[key] = value; 11 putIntoMap(map, key, value) => map[key] = value;
12 newJSList(length) => new js.JsArray(); 12 newJsList(length) => new js.JsArray();
13 cloneNotRequired(e) => e is js.JsObject; 13 cloneNotRequired(e) => e is js.JsObject;
14 } 14 }
15 15
16 class _AcceptStructuredCloneDartium extends _AcceptStructuredClone { 16 class _AcceptStructuredCloneDartium extends _AcceptStructuredClone {
17 newDartList(length) => new List(length); 17 newDartList(length) => new List(length);
18 18
19 // JsObjects won't be identical, but will be equal only if the underlying 19 // JsObjects won't be identical, but will be equal only if the underlying
20 // Js entities are identical. 20 // Js entities are identical.
21 bool identicalInJs(a, b) => 21 bool identicalInJs(a, b) =>
22 (a is js.JsObject) ? a == b : identical(a, b); 22 (a is js.JsObject) ? a == b : identical(a, b);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 final _promiseConstructor = js.context['Promise']; 54 final _promiseConstructor = js.context['Promise'];
55 bool isJavaScriptPromise(value) => value is js.JsObject && value['constructor'] == _promiseConstructor; 55 bool isJavaScriptPromise(value) => value is js.JsObject && value['constructor'] == _promiseConstructor;
56 56
57 Future convertNativePromiseToDartFuture(js.JsObject promise) { 57 Future convertNativePromiseToDartFuture(js.JsObject promise) {
58 var completer = new Completer(); 58 var completer = new Completer();
59 var newPromise = promise 59 var newPromise = promise
60 .callMethod("then", [(result) => completer.complete(result)]) 60 .callMethod("then", [(result) => completer.complete(result)])
61 .callMethod("catch", [(result) => completer.completeError(result)]); 61 .callMethod("catch", [(result) => completer.completeError(result)]);
62 return completer.future; 62 return completer.future;
63 } 63 }
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-dartium.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698