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

Unified Diff: lib/runtime/dart/_js_helper.js

Issue 1348453004: fix some errors in our SDK, mostly around numbers (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format Created 5 years, 3 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
Index: lib/runtime/dart/_js_helper.js
diff --git a/lib/runtime/dart/_js_helper.js b/lib/runtime/dart/_js_helper.js
index 066745949bb2ba3049a789e81debfd28ae1eb142..a7fe689043318fc96c22da267e9f358d51cdda15 100644
--- a/lib/runtime/dart/_js_helper.js
+++ b/lib/runtime/dart/_js_helper.js
@@ -822,13 +822,13 @@ dart_library.library('dart/_js_helper', null, /* Imports */[
return value;
}
static getProperty(object, key) {
- if (object == null || typeof object == 'boolean' || dart.is(object, core.num) || typeof object == 'string') {
+ if (object == null || typeof object == 'boolean' || typeof object == 'number' || typeof object == 'string') {
dart.throw(new core.ArgumentError(object));
}
return object[key];
}
static setProperty(object, key, value) {
- if (object == null || typeof object == 'boolean' || dart.is(object, core.num) || typeof object == 'string') {
+ if (object == null || typeof object == 'boolean' || typeof object == 'number' || typeof object == 'string') {
dart.throw(new core.ArgumentError(object));
}
object[key] = value;
@@ -895,7 +895,7 @@ dart_library.library('dart/_js_helper', null, /* Imports */[
}
dart.fn(checkNull);
function checkNum(value) {
- if (!dart.is(value, core.num)) {
+ if (!(typeof value == 'number')) {
dart.throw(new core.ArgumentError(value));
}
return value;

Powered by Google App Engine
This is Rietveld 408576698