| Index: src/heap.cc
|
| ===================================================================
|
| --- src/heap.cc (revision 3813)
|
| +++ src/heap.cc (working copy)
|
| @@ -1786,14 +1786,16 @@
|
| char arr[100];
|
| Vector<char> buffer(arr, ARRAY_SIZE(arr));
|
| const char* str;
|
| + int length = 0;
|
| if (number->IsSmi()) {
|
| int num = Smi::cast(number)->value();
|
| - str = IntToCString(num, buffer);
|
| + str = IntToCString(num, &length);
|
| } else {
|
| double num = HeapNumber::cast(number)->value();
|
| str = DoubleToCString(num, buffer);
|
| + length = strlen(str);
|
| }
|
| - Object* result = AllocateStringFromAscii(CStrVector(str));
|
| + Object* result = AllocateStringFromAscii(Vector<const char>(str, length));
|
|
|
| if (!result->IsFailure()) {
|
| SetNumberStringCache(number, String::cast(result));
|
|
|