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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart

Issue 11308147: Use 'contains' function uniformly in compiler lib to avoid pulling in unused code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
index 279ee270849d8dd3f34dc94de87ee8f05a6af0d6..d746de55eac0dd59877b5af041b35865707ac9d1 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
@@ -944,7 +944,7 @@ unwrapException(ex) {
// exception occurred.
var type = JS('var', r'#.type', ex);
var name = JS('var', r'#.arguments ? #.arguments[0] : ""', ex, ex);
- if (message.contains('JSNull') ||
+ if (contains(message, 'JSNull') ||
type == 'property_not_function' ||
type == 'called_non_callable' ||
type == 'non_object_property_call' ||
@@ -964,7 +964,7 @@ unwrapException(ex) {
message.endsWith('is undefined') ||
message.endsWith('is null or undefined')) {
return new NoSuchMethodError(null, '<unknown>', [], {});
- } else if (message.contains(' is not a function') ||
+ } else if (contains(message, ' is not a function') ||
(ieErrorCode == 438 && ieFacilityNumber == 10)) {
// Examples:
// x.foo is not a function
@@ -983,7 +983,7 @@ unwrapException(ex) {
}
if (JS('bool', r'# instanceof RangeError', ex)) {
- if (message is String && message.contains('call stack')) {
+ if (message is String && contains(message, 'call stack')) {
return new StackOverflowError();
}
« 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