Lines 62-68
Link Here
|
62 |
allocation_length_(0), |
62 |
allocation_length_(0), |
63 |
data_(data), |
63 |
data_(data), |
64 |
data_length_(0), |
64 |
data_length_(0), |
65 |
kind_(AllocationKind::kNormal), |
65 |
kind_(WTF::ArrayBufferContents::AllocationKind::kNormal), |
66 |
deleter_(deleter) {} |
66 |
deleter_(deleter) {} |
67 |
DataHandle(void* allocation_base, |
67 |
DataHandle(void* allocation_base, |
68 |
size_t allocation_length, |
68 |
size_t allocation_length, |
Lines 93-103
Link Here
|
93 |
reinterpret_cast<uintptr_t>(allocation_base_) + |
93 |
reinterpret_cast<uintptr_t>(allocation_base_) + |
94 |
allocation_length_); |
94 |
allocation_length_); |
95 |
switch (kind_) { |
95 |
switch (kind_) { |
96 |
case AllocationKind::kNormal: |
96 |
case WTF::ArrayBufferContents::AllocationKind::kNormal: |
97 |
DCHECK(deleter_); |
97 |
DCHECK(deleter_); |
98 |
deleter_(data_); |
98 |
deleter_(data_); |
99 |
return; |
99 |
return; |
100 |
case AllocationKind::kReservation: |
100 |
case WTF::ArrayBufferContents::AllocationKind::kReservation: |
101 |
ReleaseReservedMemory(allocation_base_, allocation_length_); |
101 |
ReleaseReservedMemory(allocation_base_, allocation_length_); |
102 |
return; |
102 |
return; |
103 |
} |
103 |
} |