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

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

Issue 808643004: Support breakpoints in deferred libraries (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/debugger.h » ('j') | runtime/vm/debugger.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
11 #include "vm/compiler.h" 11 #include "vm/compiler.h"
12 #include "vm/dart.h" 12 #include "vm/dart.h"
13 #include "vm/dart_api_impl.h" 13 #include "vm/dart_api_impl.h"
14 #include "vm/dart_api_message.h" 14 #include "vm/dart_api_message.h"
15 #include "vm/dart_api_state.h" 15 #include "vm/dart_api_state.h"
16 #include "vm/dart_entry.h" 16 #include "vm/dart_entry.h"
17 #include "vm/debugger.h"
17 #include "vm/debuginfo.h" 18 #include "vm/debuginfo.h"
18 #include "vm/exceptions.h" 19 #include "vm/exceptions.h"
19 #include "vm/flags.h" 20 #include "vm/flags.h"
20 #include "vm/growable_array.h" 21 #include "vm/growable_array.h"
21 #include "vm/lockers.h" 22 #include "vm/lockers.h"
22 #include "vm/message.h" 23 #include "vm/message.h"
23 #include "vm/message_handler.h" 24 #include "vm/message_handler.h"
24 #include "vm/native_entry.h" 25 #include "vm/native_entry.h"
25 #include "vm/object.h" 26 #include "vm/object.h"
26 #include "vm/object_store.h" 27 #include "vm/object_store.h"
(...skipping 5276 matching lines...) Expand 10 before | Expand all | Expand 10 after
5303 5304
5304 // TODO(hausner): move the remaining code below (finalization and 5305 // TODO(hausner): move the remaining code below (finalization and
5305 // invoing of _completeDeferredLoads) into Isolate::DoneLoading(). 5306 // invoing of _completeDeferredLoads) into Isolate::DoneLoading().
5306 5307
5307 // Finalize all classes if needed. 5308 // Finalize all classes if needed.
5308 Dart_Handle state = Api::CheckAndFinalizePendingClasses(isolate); 5309 Dart_Handle state = Api::CheckAndFinalizePendingClasses(isolate);
5309 if (::Dart_IsError(state)) { 5310 if (::Dart_IsError(state)) {
5310 return state; 5311 return state;
5311 } 5312 }
5312 5313
5314 // Now that the newly loaded classes are finalized, notify the debugger
5315 // that new code has been loaded. If there are latent breakpoints in
5316 // the new code, the debugger convert them to unresolved source breakpoints.
5317 // The code that completes the futures (invoked below) may call into the
5318 // newly loaded code and trigger one of these breakpoints.
5319 isolate->debugger()->NotifyDoneLoading();
5320
5313 if (complete_futures) { 5321 if (complete_futures) {
5314 const Library& corelib = Library::Handle(isolate, Library::CoreLibrary()); 5322 const Library& corelib = Library::Handle(isolate, Library::CoreLibrary());
5315 const String& function_name = 5323 const String& function_name =
5316 String::Handle(isolate, String::New("_completeDeferredLoads")); 5324 String::Handle(isolate, String::New("_completeDeferredLoads"));
5317 const Function& function = 5325 const Function& function =
5318 Function::Handle(isolate, 5326 Function::Handle(isolate,
5319 corelib.LookupFunctionAllowPrivate(function_name)); 5327 corelib.LookupFunctionAllowPrivate(function_name));
5320 ASSERT(!function.IsNull()); 5328 ASSERT(!function.IsNull());
5321 const Array& args = Array::empty_array(); 5329 const Array& args = Array::empty_array();
5322 5330
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
5413 5421
5414 5422
5415 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5423 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5416 const char* name, 5424 const char* name,
5417 Dart_ServiceRequestCallback callback, 5425 Dart_ServiceRequestCallback callback,
5418 void* user_data) { 5426 void* user_data) {
5419 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5427 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5420 } 5428 }
5421 5429
5422 } // namespace dart 5430 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/debugger.h » ('j') | runtime/vm/debugger.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698