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

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

Issue 1724133002: Fix InvocationMirror->Invocation in _ReturnedDictionary (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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"]);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 }); 96 });
97 return jsObject; 97 return jsObject;
98 } 98 }
99 99
100 // Creates a Dart class to allow members of the Map to be fetched (as if getters exist). 100 // Creates a Dart class to allow members of the Map to be fetched (as if getters exist).
101 // TODO(terry): Need to use package:js but that's a problem in dart:html. Talk t o 101 // TODO(terry): Need to use package:js but that's a problem in dart:html. Talk t o
102 // Jacob about how to do this properly using dart:js. 102 // Jacob about how to do this properly using dart:js.
103 class _ReturnedDictionary { 103 class _ReturnedDictionary {
104 Map _values; 104 Map _values;
105 105
106 noSuchMethod(InvocationMirror invocation) { 106 noSuchMethod(Invocation invocation) {
107 var key = MirrorSystem.getName(invocation.memberName); 107 var key = MirrorSystem.getName(invocation.memberName);
108 if (invocation.isGetter) { 108 if (invocation.isGetter) {
109 return _values[key]; 109 return _values[key];
110 } else if (invocation.isSetter && key.endsWith('=')) { 110 } else if (invocation.isSetter && key.endsWith('=')) {
111 key = key.substring(0, key.length-1); 111 key = key.substring(0, key.length-1);
112 _values[key] = invocation.positionalArguments[0]; 112 _values[key] = invocation.positionalArguments[0];
113 } 113 }
114 } 114 }
115 115
116 Map get toMap => _values; 116 Map get toMap => _values;
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 {'type': dartClass, 'extends': extendTag != null ? extendTag : "" }; 402 {'type': dartClass, 'extends': extendTag != null ? extendTag : "" };
403 } 403 }
404 404
405 Type getCustomElementType(object) { 405 Type getCustomElementType(object) {
406 var entry = getCustomElementEntry(object); 406 var entry = getCustomElementEntry(object);
407 if (entry != null) { 407 if (entry != null) {
408 return entry['type']; 408 return entry['type'];
409 } 409 }
410 return null; 410 return null;
411 } 411 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698