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

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

Issue 1873933002: Fix handling of cross-origin windows in dartium and better align general handling of different fram… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/generate_blink_file.py » ('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() => js.JsNative.newObject(); 10 newJsMap() => js.JsNative.newObject();
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 while (prototype != null) { 260 while (prototype != null) {
261 // We're a Dart class that's pointing to a JS class. 261 // We're a Dart class that's pointing to a JS class.
262 var constructor = js.JsNative.getProperty(prototype, 'constructor'); 262 var constructor = js.JsNative.getProperty(prototype, 'constructor');
263 if (constructor != null) { 263 if (constructor != null) {
264 jsTypeName = js.JsNative.getProperty(constructor, 'name'); 264 jsTypeName = js.JsNative.getProperty(constructor, 'name');
265 type = getHtmlCreateType(jsTypeName); 265 type = getHtmlCreateType(jsTypeName);
266 if (type != null) return type; 266 if (type != null) return type;
267 } 267 }
268 prototype = js.JsNative.getProperty(prototype, '__proto__'); 268 prototype = js.JsNative.getProperty(prototype, '__proto__');
269 } 269 }
270 } catch (e, stacktrace) { 270 } catch (e) {
271 if (e is DebugAssertException) print("${e.message}\n ${stacktrace}"); 271 // This case can happen for cross frame objects.
272 else print("${stacktrace}"); 272 if (js.JsNative.hasProperty(e, "postMessage")) {
Alan Knight 2016/04/12 17:05:58 Is this safe? There are quite a few other things w
Jacob 2016/04/12 17:08:51 This is the exact same conversion used in dart2js.
273 // assume this is a Window. To match Dart2JS, separate conversion code
274 // in dart:html will switch the wrapper to a cross frame window as
275 // required.
276 // TODO(jacobr): we could consider removing this code completely.
277 return Window.instanceRuntimeType;
278 }
273 } 279 }
274 return js.JSObject.instanceRuntimeType; 280 return js.JSObject.instanceRuntimeType;
275 } 281 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/generate_blink_file.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698