Index: sdk/lib/_internal/js_runtime/lib/native_helper.dart |
diff --git a/sdk/lib/_internal/js_runtime/lib/native_helper.dart b/sdk/lib/_internal/js_runtime/lib/native_helper.dart |
index c6aad9430c4302c697a8244b7b667d39de0029fd..d3ef5f200042fea09e353fee897013e39e92a27e 100644 |
--- a/sdk/lib/_internal/js_runtime/lib/native_helper.dart |
+++ b/sdk/lib/_internal/js_runtime/lib/native_helper.dart |
@@ -497,30 +497,6 @@ function() { |
*/ |
const _constructorNameFallback = const JS_CONST(r''' |
function getTagFallback(o) { |
- var constructor = o.constructor; |
- if (typeof constructor == "function") { |
- var name = constructor.name; |
- // If the name is a non-empty string, we use that as the type name of this |
- // object. There are various cases where that does not work, so we have to |
- // detect them and fall through to the toString() based implementation. |
- |
- if (typeof name == "string" && |
- |
- // Sometimes the string is empty. This test also catches minified |
- // shadow dom polyfil wrapper for Window on Firefox where the faked |
- // constructor name does not 'stick'. The shortest real DOM object |
- // names have three characters (e.g. URL, CSS). |
- name.length > 2 && |
- |
- // On Firefox we often get "Object" as the constructor name, even for |
- // more specialized DOM objects. |
- name !== "Object" && |
- |
- // This can happen in Opera. |
- name !== "Function.prototype") { |
- return name; |
- } |
- } |
var s = Object.prototype.toString.call(o); |
return s.substring(8, s.length - 1); |
}'''); |