mirror of https://github.com/nodejs/node.git
v8: work around String::WriteAscii segfault
See http://code.google.com/p/v8/issues/detail?id=2493 for details. This commit reappliespull/24507/merge9668df8
. The issue has been fixed upstream but reappeared after last night's downgrade to V8 3.14.5 in commitb15a10e
. Conflicts: test/simple/test-buffer.js
parent
17a812618d
commit
c80bde1781
|
@ -209,6 +209,8 @@ INLINE(void CopyChars(sinkchar* dest, const sourcechar* src, int chars));
|
|||
|
||||
template <typename sourcechar, typename sinkchar>
|
||||
void CopyChars(sinkchar* dest, const sourcechar* src, int chars) {
|
||||
ASSERT(chars >= 0);
|
||||
if (chars == 0) return;
|
||||
sinkchar* limit = dest + chars;
|
||||
#ifdef V8_HOST_CAN_READ_UNALIGNED
|
||||
if (sizeof(*dest) == sizeof(*src)) {
|
||||
|
|
Loading…
Reference in New Issue