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

Unified Diff: dart/frog/leg/lib/js_helper.dart

Issue 9395070: Triage Expect. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dart/frog/leg/lib/mockimpl.dart » ('j') | dart/frog/leg/ssa/codegen.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/lib/js_helper.dart
diff --git a/dart/frog/leg/lib/js_helper.dart b/dart/frog/leg/lib/js_helper.dart
index 412a7d3e9c0b0c50d2a5911184a8466ea0433bf7..525d29fbe1216648fa154098b9cc9bf9358da146 100644
--- a/dart/frog/leg/lib/js_helper.dart
+++ b/dart/frog/leg/lib/js_helper.dart
@@ -27,7 +27,7 @@ bool checkNumbers(var a, var b, var message) {
bool isJSArray(var value) {
- return JS("bool", @"$0.constructor === Array", value);
+ return value !== null && JS("bool", @"$0.constructor === Array", value);
ngeoffray 2012/02/21 12:23:51 No need.
}
@@ -960,7 +960,7 @@ builtin$contains$2(receiver, other, startIndex) {
if (other is !String) {
throw 'String.contains with non-String is not implemented';
}
- if ((startIndex !== null) || (startIndex is !num)) {
+ if ((startIndex !== null) && (startIndex is !num)) {
throw new IllegalArgumentException(startIndex);
}
return receiver.indexOf(other, startIndex) >= 0;
« no previous file with comments | « no previous file | dart/frog/leg/lib/mockimpl.dart » ('j') | dart/frog/leg/ssa/codegen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698