| 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 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 | 810 |
| 811 | 811 |
| 812 DART_EXPORT Dart_Handle Dart_NewUnhandledExceptionError(Dart_Handle exception) { | 812 DART_EXPORT Dart_Handle Dart_NewUnhandledExceptionError(Dart_Handle exception) { |
| 813 Isolate* isolate = Isolate::Current(); | 813 Isolate* isolate = Isolate::Current(); |
| 814 DARTSCOPE(isolate); | 814 DARTSCOPE(isolate); |
| 815 CHECK_CALLBACK_STATE(isolate); | 815 CHECK_CALLBACK_STATE(isolate); |
| 816 | 816 |
| 817 Instance& obj = Instance::Handle(isolate); | 817 Instance& obj = Instance::Handle(isolate); |
| 818 intptr_t class_id = Api::ClassId(exception); | 818 intptr_t class_id = Api::ClassId(exception); |
| 819 if ((class_id == kApiErrorCid) || (class_id == kLanguageErrorCid)) { | 819 if ((class_id == kApiErrorCid) || (class_id == kLanguageErrorCid)) { |
| 820 obj = String::New(Dart_GetError(exception)); | 820 obj = String::New(::Dart_GetError(exception)); |
| 821 } else { | 821 } else { |
| 822 obj = Api::UnwrapInstanceHandle(isolate, exception).raw(); | 822 obj = Api::UnwrapInstanceHandle(isolate, exception).raw(); |
| 823 if (obj.IsNull()) { | 823 if (obj.IsNull()) { |
| 824 RETURN_TYPE_ERROR(isolate, exception, Instance); | 824 RETURN_TYPE_ERROR(isolate, exception, Instance); |
| 825 } | 825 } |
| 826 } | 826 } |
| 827 const Stacktrace& stacktrace = Stacktrace::Handle(isolate); | 827 const Stacktrace& stacktrace = Stacktrace::Handle(isolate); |
| 828 return Api::NewHandle(isolate, UnhandledException::New(obj, stacktrace)); | 828 return Api::NewHandle(isolate, UnhandledException::New(obj, stacktrace)); |
| 829 } | 829 } |
| 830 | 830 |
| (...skipping 4956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5787 ASSERT(stream != NULL); | 5787 ASSERT(stream != NULL); |
| 5788 TimelineEvent* event = stream->StartEvent(); | 5788 TimelineEvent* event = stream->StartEvent(); |
| 5789 if (event != NULL) { | 5789 if (event != NULL) { |
| 5790 event->AsyncEnd(label, async_id); | 5790 event->AsyncEnd(label, async_id); |
| 5791 event->Complete(); | 5791 event->Complete(); |
| 5792 } | 5792 } |
| 5793 return Api::Success(); | 5793 return Api::Success(); |
| 5794 } | 5794 } |
| 5795 | 5795 |
| 5796 } // namespace dart | 5796 } // namespace dart |
| OLD | NEW |