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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/private/js_helper.dart

Issue 2991353003: Check for cross-frame violation (Closed)
Patch Set: Created 3 years, 4 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 | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart._js_helper; 5 library dart._js_helper;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'dart:_debugger' show stackTraceMapper; 9 import 'dart:_debugger' show stackTraceMapper;
10 10
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 Iterator<E> get iterator => new SyncIterator<E>(_jsIterator()); 903 Iterator<E> get iterator => new SyncIterator<E>(_jsIterator());
904 } 904 }
905 905
906 class BooleanConversionAssertionError extends AssertionError { 906 class BooleanConversionAssertionError extends AssertionError {
907 toString() => 'Failed assertion: boolean expression must not be null'; 907 toString() => 'Failed assertion: boolean expression must not be null';
908 } 908 }
909 909
910 // Hook to register new global object. This is invoked from dart:html 910 // Hook to register new global object. This is invoked from dart:html
911 // whenever a new window is accessed for the first time. 911 // whenever a new window is accessed for the first time.
912 void registerGlobalObject(object) { 912 void registerGlobalObject(object) {
913 if (dart.polyfill(object)) { 913 try {
914 dart.applyAllExtensions(object); 914 if (dart.polyfill(object)) {
915 dart.applyAllExtensions(object);
916 }
917 } catch (e) {
918 // This may fail due to cross-origin errors. In that case, we shouldn't
919 // need to polyfill as we can't get objects from that frame.
920
921 // TODO(vsm): Detect this more robustly - ideally before we try to polyfill.
915 } 922 }
916 } 923 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698