In utils.h we have StrLength, which returns an int, not a size_t.  That is
needed by Vector's constructor.

Say 53-bit and 64-bit, not 53bit and 64bit.

I'm sure I have seen some sort of copy to a vector that ensures a trailing null. Or if you don't want that, then compute min(strlen(original), buffer_length).


http://codereview.chromium.org/3519017/diff/1/3
File test/cctest/test-strtod.cc (right):

http://codereview.chromium.org/3519017/diff/1/3#newcode19
test/cctest/test-strtod.cc:19: OS::StrNCpy(buffer, str, kBufferSize);
This doesn't guarantee a trailing null in buffer, so strlen call later
on can be bad.  Don't we have one that guarantees a trailing null?

What is the point of this copy?  Can Strtod modify the input buffer?  Is
it just to remove the constness?

Why doesn't Strtod take a Vector<const char> anyway?

http://codereview.chromium.org/3519017/diff/1/3#newcode188
test/cctest/test-strtod.cc:188: CHECK_EQ(17e307, StrtodChar("17", 307));
How about including right and left trim in these tests?

http://codereview.chromium.org/3519017/show

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

Reply via email to