Status: New
Owner: ----
New issue 2291 by [email protected]: Object equality check error
http://code.google.com/p/v8/issues/detail?id=2291
Check following code (I've attached it also as file):
var obj = {};
var isObject = function(o) { return o === Object(o); };
// # Triggers
// 1: Useless comparison statement, this is half the trigger
obj == obj;
// 2: Initial check with object, this is the other half of the trigger
isObject(obj);
print('isObject(str) (should return false):', isObject('foo'));
print('inline check (should return false):', ('foo' === Object('foo')));
It should print 'false' twice, but prints 'true', 'false'.
It broken one of the Node scripts:
https://github.com/joyent/node/issues/3867
Attachments:
object-comparision.v8.js 382 bytes
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev