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

Unified Diff: sdk/lib/js/dart2js/js_dart2js.dart

Issue 19387005: Workaround for 11854 (broken type check) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | tests/html/html.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/js/dart2js/js_dart2js.dart
diff --git a/sdk/lib/js/dart2js/js_dart2js.dart b/sdk/lib/js/dart2js/js_dart2js.dart
index 282e5fab99098b7cb81972ec4e952dc82d8d1362..7f806b73f3744794eeca4b725e61093b6cf12008 100644
--- a/sdk/lib/js/dart2js/js_dart2js.dart
+++ b/sdk/lib/js/dart2js/js_dart2js.dart
@@ -46,7 +46,9 @@ class JsObject implements Serializable<JsObject> {
JsObject._fromJs(this._jsObject);
- factory JsObject(Serializable<JsFunction> constructor, [List arguments]) {
+ // TODO(vsm): Type constructor as Serializable<JsFunction> when
+ // dartbug.com/11854 is fixed.
+ factory JsObject(var constructor, [List arguments]) {
final constr = _convertToJS(constructor);
if (arguments == null) {
return new JsObject._fromJs(JS('=Object', 'new #()', constr));
@@ -135,7 +137,9 @@ return ret;
JS('void', 'delete #[#]', _convertToJS(this), name);
}
- bool instanceof(Serializable<JsFunction> type) =>
+ // TODO(vsm): Type type as Serializable<JsFunction> when
+ // dartbug.com/11854 is fixed.
+ bool instanceof(var type) =>
JS('bool', '# instanceof #', _convertToJS(this), _convertToJS(type));
String toString() {
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698