On 2012/06/29 10:49:02, Yang wrote:
On 2012/06/29 09:56:36, rossberg wrote:
> I'm confused. Are you sure that this doesn't break instanceof and
.constructor?

Not sure what you mean.

var a = new Array(3);
var b = new Float32Array(a);
print(b instanceof ArrayBuffer);
print(b instanceof Float32Array);
print(b.constructor)

returns the same result with and without the patch:

false
true
function Float32Array() { [native code] }

Try:

var a = new Int32Array(10)
var b = a.buffer
print(b instanceof ArrayBuffer)
print(b.constructor)

I'm sure that e.g. the first print will not give "true". (Hm, I thought I had
written tests for that.)


http://codereview.chromium.org/10700031/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to