Changeset 227609 in webkit for trunk/Source/JavaScriptCore/runtime/JSArray.cpp
- Timestamp:
- Jan 25, 2018, 9:21:09 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSArray.cpp
r227592 r227609 1 1 /* 2 2 * Copyright (C) 1999-2000 Harri Porten ([email protected]) 3 * Copyright (C) 2003-201 8Apple Inc. All rights reserved.3 * Copyright (C) 2003-2017 Apple Inc. All rights reserved. 4 4 * Copyright (C) 2003 Peter Kelly ([email protected]) 5 5 * Copyright (C) 2006 Alexey Proskuryakov ([email protected]) … … 82 82 83 83 unsigned vectorLength = Butterfly::optimalContiguousVectorLength(structure, initialLength); 84 void* temp = vm.jsValueGigacageAuxiliarySpace.allocateNonVirtual( 85 vm, 86 Butterfly::totalSize(0, outOfLineStorage, true, vectorLength * sizeof(EncodedJSValue)), 87 deferralContext, AllocationFailureMode::ReturnNull); 84 void* temp = vm.jsValueGigacageAuxiliarySpace.allocateNonVirtual(Butterfly::totalSize(0, outOfLineStorage, true, vectorLength * sizeof(EncodedJSValue)), deferralContext, AllocationFailureMode::ReturnNull); 88 85 if (UNLIKELY(!temp)) 89 86 return nullptr; … … 102 99 static const unsigned indexBias = 0; 103 100 unsigned vectorLength = ArrayStorage::optimalVectorLength(indexBias, structure, initialLength); 104 void* temp = vm.jsValueGigacageAuxiliarySpace.allocateNonVirtual( 105 vm, 106 Butterfly::totalSize(indexBias, outOfLineStorage, true, ArrayStorage::sizeFor(vectorLength)), 107 deferralContext, AllocationFailureMode::ReturnNull); 101 void* temp = vm.jsValueGigacageAuxiliarySpace.allocateNonVirtual(Butterfly::totalSize(indexBias, outOfLineStorage, true, ArrayStorage::sizeFor(vectorLength)), deferralContext, AllocationFailureMode::ReturnNull); 108 102 if (UNLIKELY(!temp)) 109 103 return nullptr; … … 375 369 } else { 376 370 size_t newSize = Butterfly::totalSize(0, propertyCapacity, true, ArrayStorage::sizeFor(desiredCapacity)); 377 newAllocBase = vm.jsValueGigacageAuxiliarySpace.allocateNonVirtual( 378 vm, newSize, nullptr, AllocationFailureMode::ReturnNull); 371 newAllocBase = vm.jsValueGigacageAuxiliarySpace.allocateNonVirtual(newSize, nullptr, AllocationFailureMode::ReturnNull); 379 372 if (!newAllocBase) 380 373 return false;
Note:
See TracChangeset
for help on using the changeset viewer.