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

Unified Diff: pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart

Issue 1213033002: Fix runtimeType.toString for tear-offs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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: pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
index b302033e8a8fa19fdea4760f045f2ad20c2e41e3..24b02570dcda15cd2bb0b4283c41fba0e1f734cd 100644
--- a/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
@@ -88,8 +88,6 @@ class ModelEmitter {
static const String deferredExtension = "part.js";
- static const String typeNameProperty = r"builtin$cls";
-
ModelEmitter(Compiler compiler, Namer namer, this.nativeEmitter)
: this.compiler = compiler,
this.namer = namer {
@@ -1185,7 +1183,10 @@ function parseFunctionDescriptor(proto, name, descriptor, typesOffset) {
typesOffset);
}
- constructor.$typeNameProperty = name; // Needed for RTI.
+ if (typeof constructor.name != 'string') {
sra1 2015/06/26 23:10:09 Use double quotes in JS for consistency with gener
floitsch 2015/07/01 17:00:14 done. also in other places.
+ // IE does not store the name, but allows to modify the property.
+ constructor.name = name;
+ }
constructor.prototype = prototype;
prototype[#operatorIsPrefix + name] = constructor;
prototype.constructor = constructor;

Powered by Google App Engine
This is Rietveld 408576698