OLD | NEW |
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" |
(...skipping 2775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2786 args_desc)); | 2786 args_desc)); |
2787 if (!function.IsNull()) { | 2787 if (!function.IsNull()) { |
2788 const Array& args = Array::Handle(Array::New(kNumArgs)); | 2788 const Array& args = Array::Handle(Array::New(kNumArgs)); |
2789 args.SetAt(0, instance); | 2789 args.SetAt(0, instance); |
2790 Instance& index = Instance::Handle(isolate); | 2790 Instance& index = Instance::Handle(isolate); |
2791 for (intptr_t i = 0; i < length; ++i) { | 2791 for (intptr_t i = 0; i < length; ++i) { |
2792 index = Integer::New(i); | 2792 index = Integer::New(i); |
2793 args.SetAt(1, index); | 2793 args.SetAt(1, index); |
2794 Dart_Handle value = Api::NewHandle(isolate, | 2794 Dart_Handle value = Api::NewHandle(isolate, |
2795 DartEntry::InvokeFunction(function, args)); | 2795 DartEntry::InvokeFunction(function, args)); |
2796 if (Dart_IsError(value)) | 2796 if (::Dart_IsError(value)) |
2797 return value; | 2797 return value; |
2798 result[i] = value; | 2798 result[i] = value; |
2799 } | 2799 } |
2800 return Api::Success(); | 2800 return Api::Success(); |
2801 } | 2801 } |
2802 } | 2802 } |
2803 return Api::NewError("Object does not implement the 'List' interface"); | 2803 return Api::NewError("Object does not implement the 'List' interface"); |
2804 } | 2804 } |
2805 } | 2805 } |
2806 | 2806 |
(...skipping 3210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6017 ASSERT(stream != NULL); | 6017 ASSERT(stream != NULL); |
6018 TimelineEvent* event = stream->StartEvent(); | 6018 TimelineEvent* event = stream->StartEvent(); |
6019 if (event != NULL) { | 6019 if (event != NULL) { |
6020 event->AsyncEnd(label, async_id); | 6020 event->AsyncEnd(label, async_id); |
6021 event->Complete(); | 6021 event->Complete(); |
6022 } | 6022 } |
6023 return Api::Success(); | 6023 return Api::Success(); |
6024 } | 6024 } |
6025 | 6025 |
6026 } // namespace dart | 6026 } // namespace dart |
OLD | NEW |