Chromium Code Reviews

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

Issue 2759533002: Remove legacy restart code (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 791 matching lines...)
802 } 802 }
803 return Api::ClassId(object) == kLanguageErrorCid; 803 return Api::ClassId(object) == kLanguageErrorCid;
804 } 804 }
805 805
806 806
807 DART_EXPORT bool Dart_IsFatalError(Dart_Handle object) { 807 DART_EXPORT bool Dart_IsFatalError(Dart_Handle object) {
808 return Api::ClassId(object) == kUnwindErrorCid; 808 return Api::ClassId(object) == kUnwindErrorCid;
809 } 809 }
810 810
811 811
812 DART_EXPORT bool Dart_IsVMRestartRequest(Dart_Handle handle) {
813 DARTSCOPE(Thread::Current());
814 const Object& obj = Object::Handle(Z, Api::UnwrapHandle(handle));
815 return (obj.IsUnwindError() && UnwindError::Cast(obj).is_vm_restart());
816 }
817
818
819 DART_EXPORT const char* Dart_GetError(Dart_Handle handle) { 812 DART_EXPORT const char* Dart_GetError(Dart_Handle handle) {
820 API_TIMELINE_DURATION; 813 API_TIMELINE_DURATION;
821 DARTSCOPE(Thread::Current()); 814 DARTSCOPE(Thread::Current());
822 const Object& obj = Object::Handle(Z, Api::UnwrapHandle(handle)); 815 const Object& obj = Object::Handle(Z, Api::UnwrapHandle(handle));
823 return GetErrorString(T, obj); 816 return GetErrorString(T, obj);
824 } 817 }
825 818
826 819
827 DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle) { 820 DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle) {
828 DARTSCOPE(Thread::Current()); 821 DARTSCOPE(Thread::Current());
(...skipping 6012 matching lines...)
6841 } 6834 }
6842 6835
6843 6836
6844 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6837 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6845 #ifndef PRODUCT 6838 #ifndef PRODUCT
6846 Profiler::DumpStackTrace(context); 6839 Profiler::DumpStackTrace(context);
6847 #endif 6840 #endif
6848 } 6841 }
6849 6842
6850 } // namespace dart 6843 } // namespace dart
OLDNEW

Powered by Google App Engine