shithub: libmujs

Download patch

ref: 56c5249e86e4051f6afccf9e8f731fe7e52e4ec9
parent: 722c02ee1b4122a9edef5991f0c8e3abc8b51d95
author: Tor Andersson <tor@ccxvii.net>
date: Tue Feb 11 09:28:01 EST 2014

Revert "Handle js_tostring on objects without toString or toValue methods."

This reverts commit 7b37ef2b8ad907a3803c5dcc8b184f788f961b80.

--- a/jsvalue.c
+++ b/jsvalue.c
@@ -93,10 +93,7 @@
 			return vv;
 		}
 	}
-
-	vv.type = JS_TSTRING;
-	vv.u.string = "[object]";
-	return vv;
+	js_typeerror(J, "cannot convert object to primitive");
 }
 
 /* ToBoolean() on a value */