Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: src/debug/debug.cc

Issue 2540943002: [inspector] fixed Debugger.getPossibleBreakpoints (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/inspector/debugger/get-possible-breakpoints-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | test/inspector/debugger/get-possible-breakpoints-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698