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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 suspended_generators.Add(handle(generator_obj)); | 1318 suspended_generators.Add(handle(generator_obj)); |
1319 } | 1319 } |
1320 } | 1320 } |
1321 } | 1321 } |
1322 | 1322 |
1323 // We do not need to replace code to debug bytecode. | 1323 // We do not need to replace code to debug bytecode. |
1324 DCHECK(baseline_exists || functions.is_empty()); | 1324 DCHECK(baseline_exists || functions.is_empty()); |
1325 DCHECK(baseline_exists || suspended_generators.is_empty()); | 1325 DCHECK(baseline_exists || suspended_generators.is_empty()); |
1326 | 1326 |
1327 // We do not need to recompile to debug bytecode. | 1327 // We do not need to recompile to debug bytecode. |
1328 if (baseline_exists && !shared->HasDebugCode()) { | 1328 if (baseline_exists && !shared->code()->has_debug_break_slots()) { |
1329 DCHECK(functions.length() > 0); | 1329 DCHECK(functions.length() > 0); |
1330 if (!Compiler::CompileDebugCode(functions.first())) return false; | 1330 if (!Compiler::CompileDebugCode(functions.first())) return false; |
1331 } | 1331 } |
1332 | 1332 |
1333 for (Handle<JSFunction> const function : functions) { | 1333 for (Handle<JSFunction> const function : functions) { |
1334 function->ReplaceCode(shared->code()); | 1334 function->ReplaceCode(shared->code()); |
1335 JSFunction::EnsureLiterals(function); | 1335 JSFunction::EnsureLiterals(function); |
1336 } | 1336 } |
1337 | 1337 |
1338 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) { | 1338 for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) { |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2565 } | 2565 } |
2566 | 2566 |
2567 | 2567 |
2568 void LockingCommandMessageQueue::Clear() { | 2568 void LockingCommandMessageQueue::Clear() { |
2569 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2569 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2570 queue_.Clear(); | 2570 queue_.Clear(); |
2571 } | 2571 } |
2572 | 2572 |
2573 } // namespace internal | 2573 } // namespace internal |
2574 } // namespace v8 | 2574 } // namespace v8 |
OLD | NEW |