File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ - (id)objectAtIndex:(NSUInteger)index {
5555
5656- (NSUInteger )countByEnumeratingWithState : (NSFastEnumerationState *)state objects : (id [])buffer count : (NSUInteger )len {
5757 RELEASE_ASSERT_WITH_MESSAGE ([TNSRuntime runtimeForVM: self ->_vm], " The runtime is deallocated." );
58+
59+ JSLockHolder lock (self->_execState );
60+
5861 if (state->state == 0 ) { // uninitialized
5962 state->state = 1 ;
6063 state->mutationsPtr = reinterpret_cast <unsigned long *>(self);
@@ -67,7 +70,6 @@ - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState*)state objects
6770 NSUInteger count = 0 ;
6871 state->itemsPtr = buffer;
6972
70- JSLockHolder lock (self->_execState );
7173 while (count < len && currentIndex < length) {
7274 *buffer++ = toObject (self->_execState , self->_object ->get (self->_execState , currentIndex));
7375 currentIndex++;
You can’t perform that action at this time.
0 commit comments