| Index: third_party/WebKit/Source/platform/heap/TraceTraits.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/TraceTraits.h b/third_party/WebKit/Source/platform/heap/TraceTraits.h
|
| index a36afa7519082078dd6156294420219d46ee7840..da167596f5c877cd7dbccdaae2ff52215aabfe5e 100644
|
| --- a/third_party/WebKit/Source/platform/heap/TraceTraits.h
|
| +++ b/third_party/WebKit/Source/platform/heap/TraceTraits.h
|
| @@ -491,8 +491,10 @@ struct TraceInCollectionTrait<NoWeakHandlingInCollections,
|
| // elements to trace.
|
| size_t length = header->payloadSize() / sizeof(T);
|
| if (std::is_polymorphic<T>::value) {
|
| - for (size_t i = 0; i < length; ++i) {
|
| - if (blink::vTableInitialized(&array[i]))
|
| + char* pointer = reinterpret_cast<char*>(array);
|
| + for (unsigned i = 0; i < length; ++i) {
|
| + char* element = pointer + i * sizeof(T);
|
| + if (blink::vTableInitialized(element))
|
| blink::TraceIfEnabled<
|
| T, IsTraceableInCollectionTrait<Traits>::value>::trace(visitor,
|
| array[i]);
|
|
|