Changeset 140584 in webkit for trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp
- Timestamp:
- Jan 23, 2013, 1:44:29 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp
r135469 r140584 112 112 size_t size = sizeof(DisjunctionContext) - sizeof(uintptr_t) + disjunction->m_frameSize * sizeof(uintptr_t); 113 113 allocatorPool = allocatorPool->ensureCapacity(size); 114 if (!allocatorPool) 115 CRASH(); 114 RELEASE_ASSERT(allocatorPool); 116 115 return new (allocatorPool->alloc(size)) DisjunctionContext(); 117 116 } … … 162 161 size_t size = sizeof(ParenthesesDisjunctionContext) - sizeof(unsigned) + (term.atom.parenthesesDisjunction->m_numSubpatterns << 1) * sizeof(unsigned) + sizeof(DisjunctionContext) - sizeof(uintptr_t) + disjunction->m_frameSize * sizeof(uintptr_t); 163 162 allocatorPool = allocatorPool->ensureCapacity(size); 164 if (!allocatorPool) 165 CRASH(); 163 RELEASE_ASSERT(allocatorPool); 166 164 return new (allocatorPool->alloc(size)) ParenthesesDisjunctionContext(output, term); 167 165 } … … 208 206 int readChecked(unsigned negativePositionOffest) 209 207 { 210 if (pos < negativePositionOffest) 211 CRASH(); 208 RELEASE_ASSERT(pos >= negativePositionOffest); 212 209 unsigned p = pos - negativePositionOffest; 213 210 ASSERT(p < length); … … 265 262 void uncheckInput(unsigned count) 266 263 { 267 if (pos < count) 268 CRASH(); 264 RELEASE_ASSERT(pos >= count); 269 265 pos -= count; 270 266 } … … 277 273 bool atEnd(unsigned negativePositionOffest) 278 274 { 279 if (pos < negativePositionOffest) 280 CRASH(); 275 RELEASE_ASSERT(pos >= negativePositionOffest); 281 276 return (pos - negativePositionOffest) == length; 282 277 } … … 1426 1421 1427 1422 allocatorPool = pattern->m_allocator->startAllocator(); 1428 if (!allocatorPool) 1429 CRASH(); 1423 RELEASE_ASSERT(allocatorPool); 1430 1424 1431 1425 DisjunctionContext* context = allocDisjunctionContext(pattern->m_body.get());
Note:
See TracChangeset
for help on using the changeset viewer.