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 "platform/assert.h" | 5 #include "platform/assert.h" |
6 #include "vm/bootstrap_natives.h" | 6 #include "vm/bootstrap_natives.h" |
7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/dart.h" | 8 #include "vm/dart.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 336 |
337 | 337 |
338 static bool RunIsolate(uword parameter) { | 338 static bool RunIsolate(uword parameter) { |
339 Isolate* isolate = reinterpret_cast<Isolate*>(parameter); | 339 Isolate* isolate = reinterpret_cast<Isolate*>(parameter); |
340 SpawnState* state = reinterpret_cast<SpawnState*>(isolate->spawn_data()); | 340 SpawnState* state = reinterpret_cast<SpawnState*>(isolate->spawn_data()); |
341 isolate->set_spawn_data(NULL); | 341 isolate->set_spawn_data(NULL); |
342 { | 342 { |
343 StartIsolateScope start_scope(isolate); | 343 StartIsolateScope start_scope(isolate); |
344 Zone zone(isolate); | 344 Zone zone(isolate); |
345 HandleScope handle_scope(isolate); | 345 HandleScope handle_scope(isolate); |
346 if (!ClassFinalizer::FinalizePendingClasses()) { | 346 if (!ClassFinalizer::FinalizeAllClasses()) { |
347 // Error is in sticky error already. | 347 // Error is in sticky error already. |
348 return false; | 348 return false; |
349 } | 349 } |
350 Object& result = Object::Handle(); | 350 Object& result = Object::Handle(); |
351 | 351 |
352 result = state->ResolveFunction(); | 352 result = state->ResolveFunction(); |
353 delete state; | 353 delete state; |
354 state = NULL; | 354 state = NULL; |
355 if (result.IsError()) { | 355 if (result.IsError()) { |
356 StoreError(isolate, result); | 356 StoreError(isolate, result); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 441 |
442 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { | 442 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { |
443 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); | 443 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); |
444 if (port.IsError()) { | 444 if (port.IsError()) { |
445 Exceptions::PropagateError(Error::Cast(port)); | 445 Exceptions::PropagateError(Error::Cast(port)); |
446 } | 446 } |
447 arguments->SetReturn(port); | 447 arguments->SetReturn(port); |
448 } | 448 } |
449 | 449 |
450 } // namespace dart | 450 } // namespace dart |
OLD | NEW |