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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 object)); | 153 object)); |
154 return reinterpret_cast<FinalizablePersistentHandle*>(object); | 154 return reinterpret_cast<FinalizablePersistentHandle*>(object); |
155 } | 155 } |
156 | 156 |
157 | 157 |
158 Dart_Handle Api::CheckIsolateState(Isolate* isolate) { | 158 Dart_Handle Api::CheckIsolateState(Isolate* isolate) { |
159 if (!isolate->AllowClassFinalization()) { | 159 if (!isolate->AllowClassFinalization()) { |
160 // Class finalization is blocked for the isolate. Do nothing. | 160 // Class finalization is blocked for the isolate. Do nothing. |
161 return Api::Success(); | 161 return Api::Success(); |
162 } | 162 } |
163 if (ClassFinalizer::FinalizeTypeHierarchy()) { | 163 if (ClassFinalizer::ProcessPendingClasses()) { |
164 return Api::Success(); | 164 return Api::Success(); |
165 } | 165 } |
166 ASSERT(isolate->object_store()->sticky_error() != Object::null()); | 166 ASSERT(isolate->object_store()->sticky_error() != Object::null()); |
167 return Api::NewHandle(isolate, isolate->object_store()->sticky_error()); | 167 return Api::NewHandle(isolate, isolate->object_store()->sticky_error()); |
168 } | 168 } |
169 | 169 |
170 | 170 |
171 Dart_Isolate Api::CastIsolate(Isolate* isolate) { | 171 Dart_Isolate Api::CastIsolate(Isolate* isolate) { |
172 return reinterpret_cast<Dart_Isolate>(isolate); | 172 return reinterpret_cast<Dart_Isolate>(isolate); |
173 } | 173 } |
(...skipping 4269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4443 } | 4443 } |
4444 { | 4444 { |
4445 NoGCScope no_gc; | 4445 NoGCScope no_gc; |
4446 RawObject* raw_obj = obj.raw(); | 4446 RawObject* raw_obj = obj.raw(); |
4447 isolate->heap()->SetPeer(raw_obj, peer); | 4447 isolate->heap()->SetPeer(raw_obj, peer); |
4448 } | 4448 } |
4449 return Api::Success(); | 4449 return Api::Success(); |
4450 } | 4450 } |
4451 | 4451 |
4452 } // namespace dart | 4452 } // namespace dart |
OLD | NEW |