| OLD | NEW |
| 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 "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
| 6 | 6 |
| 7 #include "vm/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
| 8 #include "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
| 9 #include "vm/debugger.h" | 9 #include "vm/debugger.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 Dart_Handle* class_name, | 458 Dart_Handle* class_name, |
| 459 intptr_t* library_id, | 459 intptr_t* library_id, |
| 460 intptr_t* super_class_id, | 460 intptr_t* super_class_id, |
| 461 Dart_Handle* static_fields) { | 461 Dart_Handle* static_fields) { |
| 462 Isolate* isolate = Isolate::Current(); | 462 Isolate* isolate = Isolate::Current(); |
| 463 DARTSCOPE(isolate); | 463 DARTSCOPE(isolate); |
| 464 if (!isolate->class_table()->IsValidIndex(cls_id)) { | 464 if (!isolate->class_table()->IsValidIndex(cls_id)) { |
| 465 return Api::NewError("%s: %d is not a valid class id", | 465 return Api::NewError("%s: %d is not a valid class id", |
| 466 CURRENT_FUNC, cls_id); | 466 CURRENT_FUNC, cls_id); |
| 467 } | 467 } |
| 468 Class& cls = Class::Handle(isolate->class_table()->At(cls_id)); | 468 Class& cls = Class::Handle(isolate, isolate->class_table()->At(cls_id)); |
| 469 if (class_name != NULL) { | 469 if (class_name != NULL) { |
| 470 *class_name = Api::NewHandle(isolate, cls.Name()); | 470 *class_name = Api::NewHandle(isolate, cls.Name()); |
| 471 } | 471 } |
| 472 if (library_id != NULL) { | 472 if (library_id != NULL) { |
| 473 const Library& lib = Library::Handle(isolate, cls.library()); | 473 const Library& lib = Library::Handle(isolate, cls.library()); |
| 474 *library_id = lib.index(); | 474 *library_id = lib.index(); |
| 475 } | 475 } |
| 476 if (super_class_id != NULL) { | 476 if (super_class_id != NULL) { |
| 477 *super_class_id = 0; | 477 *super_class_id = 0; |
| 478 cls = cls.SuperClass(); | 478 Class& super_cls = Class::Handle(isolate, cls.SuperClass()); |
| 479 if (!cls.IsNull()) { | 479 if (!super_cls.IsNull()) { |
| 480 *super_class_id = cls.id(); | 480 *super_class_id = super_cls.id(); |
| 481 } | 481 } |
| 482 } | 482 } |
| 483 if (static_fields != NULL) { | 483 if (static_fields != NULL) { |
| 484 *static_fields = | 484 *static_fields = |
| 485 Api::NewHandle(isolate, isolate->debugger()->GetStaticFields(cls)); | 485 Api::NewHandle(isolate, isolate->debugger()->GetStaticFields(cls)); |
| 486 } | 486 } |
| 487 return Api::True(isolate); | 487 return Api::True(isolate); |
| 488 } | 488 } |
| 489 | 489 |
| 490 | 490 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 for (int i = 0; i < num_libs; i++) { | 650 for (int i = 0; i < num_libs; i++) { |
| 651 lib ^= libs.At(i); | 651 lib ^= libs.At(i); |
| 652 ASSERT(!lib.IsNull()); | 652 ASSERT(!lib.IsNull()); |
| 653 lib_url = lib.url(); | 653 lib_url = lib.url(); |
| 654 library_url_list.SetAt(i, lib_url); | 654 library_url_list.SetAt(i, lib_url); |
| 655 } | 655 } |
| 656 return Api::NewHandle(isolate, library_url_list.raw()); | 656 return Api::NewHandle(isolate, library_url_list.raw()); |
| 657 } | 657 } |
| 658 | 658 |
| 659 } // namespace dart | 659 } // namespace dart |
| OLD | NEW |