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

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

Issue 1411303007: Revert "Failure from a few days ago (returning null) on an exception masked error" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged Created 5 years, 1 month 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 wrap_jso(jsObject) { 114 wrap_jso(jsObject) {
115 try { 115 try {
116 if (jsObject is! js.JsObject || jsObject == null) { 116 if (jsObject is! js.JsObject || jsObject == null) {
117 // JS Interop converted the object to a Dart class e.g., Uint8ClampedList. 117 // JS Interop converted the object to a Dart class e.g., Uint8ClampedList.
118 // or it's a simple type. 118 // or it's a simple type.
119 return jsObject; 119 return jsObject;
120 } 120 }
121 121
122 var wrapper = js.getDartHtmlWrapperFor(jsObject); 122 var wrapper = js.getDartHtmlWrapperFor(jsObject);
123 // if we have a wrapper return the Dart instance. 123 // if we have a wrapper return the Dart instance.
124 if (wrapper != null && wrapper is! js.JsObject) { 124 if (wrapper != null) {
125 return wrapper; 125 return wrapper;
126 } 126 }
127 127
128 if (jsObject is js.JsArray) { 128 if (jsObject is js.JsArray) {
129 var wrappingList = new DartHtmlWrappingList(jsObject); 129 var wrappingList = new DartHtmlWrappingList(jsObject);
130 js.setDartHtmlWrapperFor(jsObject, wrappingList); 130 js.setDartHtmlWrapperFor(jsObject, wrappingList);
131 return wrappingList; 131 return wrappingList;
132 } 132 }
133 133
134 // Try the most general type conversions on it. 134 // Try the most general type conversions on it.
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 372
373 final js.JsArray blink_jsObject; 373 final js.JsArray blink_jsObject;
374 374
375 operator [](int index) => wrap_jso(js.JsNative.getArrayIndex(blink_jsObject, i ndex)); 375 operator [](int index) => wrap_jso(js.JsNative.getArrayIndex(blink_jsObject, i ndex));
376 376
377 operator []=(int index, value) => blink_jsObject[index] = value; 377 operator []=(int index, value) => blink_jsObject[index] = value;
378 378
379 int get length => blink_jsObject.length; 379 int get length => blink_jsObject.length;
380 int set length(int newLength) => blink_jsObject.length = newLength; 380 int set length(int newLength) => blink_jsObject.length = newLength;
381 } 381 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698