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 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1353 for (int i = 0; i < candidates.length(); ++i) { | 1353 for (int i = 0; i < candidates.length(); ++i) { |
1354 // Code that cannot be compiled lazily are internal and not debuggable. | 1354 // Code that cannot be compiled lazily are internal and not debuggable. |
1355 DCHECK(candidates[i]->allows_lazy_compilation()); | 1355 DCHECK(candidates[i]->allows_lazy_compilation()); |
1356 if (!candidates[i]->HasDebugCode()) { | 1356 if (!candidates[i]->HasDebugCode()) { |
1357 if (!Compiler::CompileDebugCode(candidates[i])) { | 1357 if (!Compiler::CompileDebugCode(candidates[i])) { |
1358 return false; | 1358 return false; |
1359 } else { | 1359 } else { |
1360 was_compiled = true; | 1360 was_compiled = true; |
1361 } | 1361 } |
1362 } | 1362 } |
1363 if (!candidates[i]->HasDebugInfo()) CreateDebugInfo(candidates[i]); | 1363 if (!EnsureDebugInfo(candidates[i], Handle<JSFunction>::null())) |
Yang
2016/11/30 20:44:36
I think you can remove the whole if block checking
kozy
2016/11/30 22:21:58
I can remove this block if I'll pass JSFunction as
| |
1364 return false; | |
1364 } | 1365 } |
1365 if (was_compiled) continue; | 1366 if (was_compiled) continue; |
1366 | 1367 |
1367 for (int i = 0; i < candidates.length(); ++i) { | 1368 for (int i = 0; i < candidates.length(); ++i) { |
1368 CHECK(candidates[i]->HasDebugInfo()); | 1369 CHECK(candidates[i]->HasDebugInfo()); |
1369 Handle<DebugInfo> debug_info(candidates[i]->GetDebugInfo()); | 1370 Handle<DebugInfo> debug_info(candidates[i]->GetDebugInfo()); |
1370 FindBreakablePositions(debug_info, start_position, end_position, | 1371 FindBreakablePositions(debug_info, start_position, end_position, |
1371 STATEMENT_ALIGNED, positions); | 1372 STATEMENT_ALIGNED, positions); |
1372 } | 1373 } |
1373 return true; | 1374 return true; |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2125 v8::Debug::ClientData* EventDetailsImpl::GetClientData() const { | 2126 v8::Debug::ClientData* EventDetailsImpl::GetClientData() const { |
2126 return client_data_; | 2127 return client_data_; |
2127 } | 2128 } |
2128 | 2129 |
2129 v8::Isolate* EventDetailsImpl::GetIsolate() const { | 2130 v8::Isolate* EventDetailsImpl::GetIsolate() const { |
2130 return reinterpret_cast<v8::Isolate*>(exec_state_->GetIsolate()); | 2131 return reinterpret_cast<v8::Isolate*>(exec_state_->GetIsolate()); |
2131 } | 2132 } |
2132 | 2133 |
2133 } // namespace internal | 2134 } // namespace internal |
2134 } // namespace v8 | 2135 } // namespace v8 |
OLD | NEW |