Index: src/messages.js |
diff --git a/src/messages.js b/src/messages.js |
index 2cb778fc13c1fbc7b2e7991acda618f9389430ac..0bfaf6c6118f636e45a029d0e5dabc4ec02c3ae5 100644 |
--- a/src/messages.js |
+++ b/src/messages.js |
@@ -192,7 +192,7 @@ function NoSideEffectToString(obj) { |
if (IS_NULL(obj)) return 'null'; |
if (IS_FUNCTION(obj)) return %_CallFunction(obj, FunctionToString); |
if (IS_OBJECT(obj) && %GetDataProperty(obj, "toString") === ObjectToString) { |
- var constructor = obj.constructor; |
+ var constructor = %GetDataProperty(obj, "constructor"); |
if (typeof constructor == "function") { |
var constructorName = constructor.name; |
if (IS_STRING(constructorName) && constructorName !== "") { |