OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/debug/debug.h" | 5 #include "src/debug/debug.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 // for which no JSFunction exists. | 1312 // for which no JSFunction exists. |
1313 { | 1313 { |
1314 SharedFunctionInfo::Iterator iterator(isolate_); | 1314 SharedFunctionInfo::Iterator iterator(isolate_); |
1315 while (SharedFunctionInfo* shared = iterator.Next()) { | 1315 while (SharedFunctionInfo* shared = iterator.Next()) { |
1316 if (!shared->OptimizedCodeMapIsCleared()) { | 1316 if (!shared->OptimizedCodeMapIsCleared()) { |
1317 shared->ClearOptimizedCodeMap(); | 1317 shared->ClearOptimizedCodeMap(); |
1318 } | 1318 } |
1319 } | 1319 } |
1320 } | 1320 } |
1321 | 1321 |
1322 // Make sure we abort incremental marking. | |
1323 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, | |
1324 "prepare for break points"); | |
1325 | |
1326 bool is_interpreted = shared->HasBytecodeArray(); | 1322 bool is_interpreted = shared->HasBytecodeArray(); |
1327 | 1323 |
1328 { | 1324 { |
1329 // TODO(yangguo): with bytecode, we still walk the heap to find all | 1325 // TODO(yangguo): with bytecode, we still walk the heap to find all |
1330 // optimized code for the function to deoptimize. We can probably be | 1326 // optimized code for the function to deoptimize. We can probably be |
1331 // smarter here and avoid the heap walk. | 1327 // smarter here and avoid the heap walk. |
1332 HeapIterator iterator(isolate_->heap()); | 1328 HeapIterator iterator(isolate_->heap()); |
1333 HeapObject* obj; | 1329 HeapObject* obj; |
1334 bool include_generators = !is_interpreted && shared->is_generator(); | 1330 bool include_generators = !is_interpreted && shared->is_generator(); |
1335 | 1331 |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2586 } | 2582 } |
2587 | 2583 |
2588 | 2584 |
2589 void LockingCommandMessageQueue::Clear() { | 2585 void LockingCommandMessageQueue::Clear() { |
2590 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2586 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2591 queue_.Clear(); | 2587 queue_.Clear(); |
2592 } | 2588 } |
2593 | 2589 |
2594 } // namespace internal | 2590 } // namespace internal |
2595 } // namespace v8 | 2591 } // namespace v8 |
OLD | NEW |