chromium-browser-stable/chromium-38.0.2125.101-issue566583002_1.patch
2014-10-13 14:09:17 +04:00

28 lines
1.2 KiB
Diff

diff -urN chromium-38.0.2125.101.orig/v8/src/utils.h chromium-38.0.2125.101/v8/src/utils.h
--- chromium-38.0.2125.101.orig/v8/src/utils.h 2014-10-08 18:43:51.379129324 +0400
+++ chromium-38.0.2125.101/v8/src/utils.h 2014-10-08 18:47:01.820047847 +0400
@@ -1351,20 +1351,10 @@
void CopyCharsUnsigned(sinkchar* dest, const sourcechar* src, int chars) {
sinkchar* limit = dest + chars;
#ifdef V8_HOST_CAN_READ_UNALIGNED
- if (sizeof(*dest) == sizeof(*src)) {
- if (chars >= static_cast<int>(kMinComplexMemCopy / sizeof(*dest))) {
- MemCopy(dest, src, chars * sizeof(*dest));
- return;
- }
- // Number of characters in a uintptr_t.
- static const int kStepSize = sizeof(uintptr_t) / sizeof(*dest); // NOLINT
- DCHECK(dest + kStepSize > dest); // Check for overflow.
- while (dest + kStepSize <= limit) {
- *reinterpret_cast<uintptr_t*>(dest) =
- *reinterpret_cast<const uintptr_t*>(src);
- dest += kStepSize;
- src += kStepSize;
- }
+ if ((sizeof(*dest) == sizeof(*src)) &&
+ (chars >= static_cast<int>(kMinComplexMemCopy / sizeof(*dest)))) {
+ MemCopy(dest, src, chars * sizeof(*dest));
+ return;
}
#endif
while (dest < limit) {