@@ -106,7 +106,7 @@ class ArrayBuffer {
106106 if (!buf)
107107 return ThrowError (" Unable to allocate ArrayBuffer." );
108108
109- args.This ()->SetPointerInInternalField (0 , buf);
109+ args.This ()->SetAlignedPointerInInternalField (0 , buf);
110110
111111 args.This ()->Set (v8::String::New (" byteLength" ),
112112 v8::Integer::NewFromUnsigned (num_bytes),
@@ -157,8 +157,8 @@ class ArrayBuffer {
157157
158158 if (buffer.IsEmpty ()) return v8::Undefined (); // constructor failed
159159
160- void * src = args.This ()->GetPointerFromInternalField (0 );
161- void * dest = buffer->GetPointerFromInternalField (0 );
160+ void * src = args.This ()->GetAlignedPointerFromInternalField (0 );
161+ void * dest = buffer->GetAlignedPointerFromInternalField (0 );
162162 memcpy (dest, static_cast <char *>(src) + begin, slice_length);
163163
164164 return buffer;
@@ -274,7 +274,7 @@ class TypedArray {
274274 GetFunction ()->NewInstance (1 , argv);
275275 if (buffer.IsEmpty ()) return v8::Undefined (); // constructor failed
276276
277- void * buf = buffer->GetPointerFromInternalField (0 );
277+ void * buf = buffer->GetAlignedPointerFromInternalField (0 );
278278 args.This ()->SetIndexedPropertiesToExternalArrayData (
279279 buf, TEAType, length);
280280 // TODO(deanm): check for failure.
@@ -303,7 +303,7 @@ class TypedArray {
303303 GetFunction ()->NewInstance (1 , argv);
304304 if (buffer.IsEmpty ()) return v8::Undefined (); // constructor failed
305305
306- void * buf = buffer->GetPointerFromInternalField (0 );
306+ void * buf = buffer->GetAlignedPointerFromInternalField (0 );
307307 args.This ()->SetIndexedPropertiesToExternalArrayData (
308308 buf, TEAType, length);
309309 // TODO(deanm): check for failure.
0 commit comments