[webkit-reviews] review denied: [Bug 81588] Array.prototype.toString should be generic : [Attachment 134723] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 30 11:09:32 PDT 2012


Erik Arvidsson <arv at chromium.org> has denied hojong.han at samsung.com's request
for review:
Bug 81588: Array.prototype.toString should be generic
https://bugs.webkit.org/show_bug.cgi?id=81588

Attachment 134723: Patch
https://bugs.webkit.org/attachment.cgi?id=134723&action=review

------- Additional Comments from Erik Arvidsson <arv at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=134723&action=review


Please add tests that ensures the correct behavior.

var obj = {__proto__: Array.prototype, 0: 'a', 1: 'b', 2: 'c', length: 3}
shouldBeEqualToString('obj.toString()', 'a,b,c');

var join = {join: function() { return 'join' }}
shouldBeEqualToString('Array.prototype.toString.call(join)', 'join')

shouldBeEqualToString('Array.prototype.toString.call(new Date)', '[object
Date]')

> Source/JavaScriptCore/runtime/ArrayPrototype.cpp:260
> +	       JSValue value = thisValue.asCell()->toPrimitive(exec,
PreferString);

This does not look correct. How does this check for "join" etc?


More information about the webkit-reviews mailing list