diff options
Diffstat (limited to 'deps/v8/src/allocation.cc')
-rw-r--r-- | deps/v8/src/allocation.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/deps/v8/src/allocation.cc b/deps/v8/src/allocation.cc index 41724b68cf..678f4fd7d2 100644 --- a/deps/v8/src/allocation.cc +++ b/deps/v8/src/allocation.cc @@ -80,7 +80,7 @@ void AllStatic::operator delete(void* p) { char* StrDup(const char* str) { - int length = strlen(str); + int length = StrLength(str); char* result = NewArray<char>(length + 1); memcpy(result, str, length * kCharSize); result[length] = '\0'; @@ -88,8 +88,8 @@ char* StrDup(const char* str) { } -char* StrNDup(const char* str, size_t n) { - size_t length = strlen(str); +char* StrNDup(const char* str, int n) { + int length = StrLength(str); if (n < length) length = n; char* result = NewArray<char>(length + 1); memcpy(result, str, length * kCharSize); |