OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 } | 1099 } |
1100 } | 1100 } |
1101 | 1101 |
1102 void ThreadState::removeInterruptor(Interruptor* interruptor) | 1102 void ThreadState::removeInterruptor(Interruptor* interruptor) |
1103 { | 1103 { |
1104 checkThread(); | 1104 checkThread(); |
1105 SafePointScope scope(HeapPointersOnStack, SafePointScope::AllowNesting); | 1105 SafePointScope scope(HeapPointersOnStack, SafePointScope::AllowNesting); |
1106 { | 1106 { |
1107 MutexLocker locker(threadAttachMutex()); | 1107 MutexLocker locker(threadAttachMutex()); |
1108 size_t index = m_interruptors.find(interruptor); | 1108 size_t index = m_interruptors.find(interruptor); |
1109 RELEASE_ASSERT(index >= 0); | 1109 RELEASE_ASSERT(index != kNotFound); |
1110 m_interruptors.remove(index); | 1110 m_interruptors.remove(index); |
1111 } | 1111 } |
1112 } | 1112 } |
1113 | 1113 |
1114 void ThreadState::Interruptor::onInterrupted() | 1114 void ThreadState::Interruptor::onInterrupted() |
1115 { | 1115 { |
1116 ThreadState* state = ThreadState::current(); | 1116 ThreadState* state = ThreadState::current(); |
1117 ASSERT(state); | 1117 ASSERT(state); |
1118 ASSERT(!state->isAtSafePoint()); | 1118 ASSERT(!state->isAtSafePoint()); |
1119 state->safePoint(HeapPointersOnStack); | 1119 state->safePoint(HeapPointersOnStack); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 return gcInfo; | 1161 return gcInfo; |
1162 } | 1162 } |
1163 } | 1163 } |
1164 if (needLockForIteration) | 1164 if (needLockForIteration) |
1165 threadAttachMutex().unlock(); | 1165 threadAttachMutex().unlock(); |
1166 return nullptr; | 1166 return nullptr; |
1167 } | 1167 } |
1168 #endif | 1168 #endif |
1169 | 1169 |
1170 } // namespace blink | 1170 } // namespace blink |
OLD | NEW |