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

Side by Side Diff: runtime/vm/debugger.cc

Issue 1096173005: Do not register service isolate descendants for debugging (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/service/vmservice.dart » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/debugger.h" 5 #include "vm/debugger.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 latent_breakpoints_ = latent_breakpoints_->next(); 1059 latent_breakpoints_ = latent_breakpoints_->next();
1060 delete bpt; 1060 delete bpt;
1061 } 1061 }
1062 while (code_breakpoints_ != NULL) { 1062 while (code_breakpoints_ != NULL) {
1063 CodeBreakpoint* bpt = code_breakpoints_; 1063 CodeBreakpoint* bpt = code_breakpoints_;
1064 code_breakpoints_ = code_breakpoints_->next(); 1064 code_breakpoints_ = code_breakpoints_->next();
1065 bpt->Disable(); 1065 bpt->Disable();
1066 delete bpt; 1066 delete bpt;
1067 } 1067 }
1068 // Signal isolate shutdown event. 1068 // Signal isolate shutdown event.
1069 if (!ServiceIsolate::IsServiceIsolate(isolate_)) { 1069 if (!ServiceIsolate::IsServiceIsolateDescendant(isolate_)) {
1070 SignalIsolateEvent(DebuggerEvent::kIsolateShutdown); 1070 SignalIsolateEvent(DebuggerEvent::kIsolateShutdown);
1071 } 1071 }
1072 } 1072 }
1073 1073
1074 1074
1075 static RawFunction* ResolveLibraryFunction( 1075 static RawFunction* ResolveLibraryFunction(
1076 const Library& library, 1076 const Library& library,
1077 const String& fname) { 1077 const String& fname) {
1078 ASSERT(!library.IsNull()); 1078 ASSERT(!library.IsNull());
1079 const Object& object = Object::Handle(library.ResolveName(fname)); 1079 const Object& object = Object::Handle(library.ResolveName(fname));
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2256 // Use the isolate's control port as the isolate_id for debugging. 2256 // Use the isolate's control port as the isolate_id for debugging.
2257 // This port will be used as a unique ID to represent the isolate in the 2257 // This port will be used as a unique ID to represent the isolate in the
2258 // debugger wire protocol messages. 2258 // debugger wire protocol messages.
2259 isolate_id_ = isolate->main_port(); 2259 isolate_id_ = isolate->main_port();
2260 initialized_ = true; 2260 initialized_ = true;
2261 } 2261 }
2262 2262
2263 2263
2264 void Debugger::NotifyIsolateCreated() { 2264 void Debugger::NotifyIsolateCreated() {
2265 // Signal isolate creation event. 2265 // Signal isolate creation event.
2266 if (!ServiceIsolate::IsServiceIsolate(isolate_)) { 2266 if (!ServiceIsolate::IsServiceIsolateDescendant(isolate_)) {
2267 SignalIsolateEvent(DebuggerEvent::kIsolateCreated); 2267 SignalIsolateEvent(DebuggerEvent::kIsolateCreated);
2268 } 2268 }
2269 } 2269 }
2270 2270
2271 2271
2272 // Return innermost closure contained in 'function' that contains 2272 // Return innermost closure contained in 'function' that contains
2273 // the given token position. 2273 // the given token position.
2274 RawFunction* Debugger::FindInnermostClosure(const Function& function, 2274 RawFunction* Debugger::FindInnermostClosure(const Function& function,
2275 intptr_t token_pos) { 2275 intptr_t token_pos) {
2276 const Class& owner = Class::Handle(isolate_, function.Owner()); 2276 const Class& owner = Class::Handle(isolate_, function.Owner());
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 } 2639 }
2640 2640
2641 2641
2642 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 2642 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
2643 ASSERT(bpt->next() == NULL); 2643 ASSERT(bpt->next() == NULL);
2644 bpt->set_next(code_breakpoints_); 2644 bpt->set_next(code_breakpoints_);
2645 code_breakpoints_ = bpt; 2645 code_breakpoints_ = bpt;
2646 } 2646 }
2647 2647
2648 } // namespace dart 2648 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/service/vmservice.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698