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 |
1322 bool is_interpreted = shared->HasBytecodeArray(); | 1326 bool is_interpreted = shared->HasBytecodeArray(); |
1323 | 1327 |
1324 { | 1328 { |
1325 // TODO(yangguo): with bytecode, we still walk the heap to find all | 1329 // TODO(yangguo): with bytecode, we still walk the heap to find all |
1326 // optimized code for the function to deoptimize. We can probably be | 1330 // optimized code for the function to deoptimize. We can probably be |
1327 // smarter here and avoid the heap walk. | 1331 // smarter here and avoid the heap walk. |
1328 HeapIterator iterator(isolate_->heap()); | 1332 HeapIterator iterator(isolate_->heap()); |
1329 HeapObject* obj; | 1333 HeapObject* obj; |
1330 bool include_generators = !is_interpreted && shared->is_generator(); | 1334 bool include_generators = !is_interpreted && shared->is_generator(); |
1331 | 1335 |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2582 } | 2586 } |
2583 | 2587 |
2584 | 2588 |
2585 void LockingCommandMessageQueue::Clear() { | 2589 void LockingCommandMessageQueue::Clear() { |
2586 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2590 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2587 queue_.Clear(); | 2591 queue_.Clear(); |
2588 } | 2592 } |
2589 | 2593 |
2590 } // namespace internal | 2594 } // namespace internal |
2591 } // namespace v8 | 2595 } // namespace v8 |
OLD | NEW |