Index: src/js/messages.js |
diff --git a/src/js/messages.js b/src/js/messages.js |
index 3bbe1ef20014c84c0c18755a48deeb398d03646c..cd9c5e534ede1219bc5885d72a9ed06f32069bab 100644 |
--- a/src/js/messages.js |
+++ b/src/js/messages.js |
@@ -601,12 +601,7 @@ function FormatStackTrace(obj, raw_stack) { |
function GetTypeName(receiver, requireConstructor) { |
if (IS_NULL_OR_UNDEFINED(receiver)) return null; |
if (IS_PROXY(receiver)) return "Proxy"; |
- |
- var constructor = %GetDataProperty(TO_OBJECT(receiver), "constructor"); |
- if (!IS_FUNCTION(constructor)) { |
- return requireConstructor ? null : %_Call(NoSideEffectsToString, receiver); |
- } |
- return %FunctionGetName(constructor); |
+ return %GetConstructorName(receiver); |
} |