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

Unified Diff: sdk/lib/_internal/js_runtime/lib/js_rti.dart

Issue 1354463003: dart2js: clean up setRuntimeType (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebase and remove comment. 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
« 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/js_runtime/lib/js_rti.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/js_rti.dart b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
index c8a8308373a96795725dc4e865590ffbf6b95611..ae8fc9d72f088c26b54579842fcaf22e57995f4d 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_rti.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
@@ -92,11 +92,7 @@ getMangledTypeName(TypeImpl type) => type._typeName;
@NoInline()
Object setRuntimeTypeInfo(Object target, var rti) {
assert(rti == null || isJsArray(rti));
- // We have to check for null because factories may return null.
- // TODO(sra): How is this true? The factory should be executing some code that
- // creates an object that already has the correct info. There should not be a
- // second setRuntimeTypeInfo on the possibly null value.
- if (target != null) JS('var', r'#.$builtinTypeInfo = #', target, rti);
+ JS('var', r'#.$builtinTypeInfo = #', target, rti);
return target;
}
« 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