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

Side by Side Diff: sdk/lib/_internal/lib/js_helper.dart

Issue 338103004: Use metadata for patching. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/lib/isolate_patch.dart ('k') | sdk/lib/_internal/lib/math_patch.dart » ('j') | 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 _js_helper; 5 library _js_helper;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:_isolate_helper' show 8 import 'dart:_isolate_helper' show
9 IsolateNatives, 9 IsolateNatives,
10 leaveJsAsync, 10 leaveJsAsync,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 unmangleGlobalNameIfPreservedAnyways, 51 unmangleGlobalNameIfPreservedAnyways,
52 unmangleAllIdentifiersIfPreservedAnyways; 52 unmangleAllIdentifiersIfPreservedAnyways;
53 53
54 part 'annotations.dart'; 54 part 'annotations.dart';
55 part 'constant_map.dart'; 55 part 'constant_map.dart';
56 part 'native_helper.dart'; 56 part 'native_helper.dart';
57 part 'regexp_helper.dart'; 57 part 'regexp_helper.dart';
58 part 'string_helper.dart'; 58 part 'string_helper.dart';
59 part 'js_rti.dart'; 59 part 'js_rti.dart';
60 60
61 class _Patch {
62 const _Patch();
63 }
64
65 const _Patch patch = const _Patch();
66
61 bool isJsIndexable(var object, var record) { 67 bool isJsIndexable(var object, var record) {
62 if (record != null) { 68 if (record != null) {
63 var result = dispatchRecordIndexability(record); 69 var result = dispatchRecordIndexability(record);
64 if (result != null) return result; 70 if (result != null) return result;
65 } 71 }
66 return object is JavaScriptIndexingBehavior; 72 return object is JavaScriptIndexingBehavior;
67 } 73 }
68 74
69 String S(value) { 75 String S(value) {
70 if (value is String) return value; 76 if (value is String) return value;
(...skipping 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after
3312 JS('', '#.addEventListener("error", #, false)', 3318 JS('', '#.addEventListener("error", #, false)',
3313 script, convertDartClosureToJS((event) { 3319 script, convertDartClosureToJS((event) {
3314 completer.completeError( 3320 completer.completeError(
3315 new DeferredLoadException("Loading $uri failed.")); 3321 new DeferredLoadException("Loading $uri failed."));
3316 }, 1)); 3322 }, 1));
3317 JS('', 'document.body.appendChild(#)', script); 3323 JS('', 'document.body.appendChild(#)', script);
3318 3324
3319 return completer.future; 3325 return completer.future;
3320 }); 3326 });
3321 } 3327 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/lib/isolate_patch.dart ('k') | sdk/lib/_internal/lib/math_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698