| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 | 329 |
| 330 Isolate::SetCurrent(parent_isolate); | 330 Isolate::SetCurrent(parent_isolate); |
| 331 return true; | 331 return true; |
| 332 } | 332 } |
| 333 | 333 |
| 334 | 334 |
| 335 static bool RunIsolate(uword parameter) { | 335 static bool RunIsolate(uword parameter) { |
| 336 Isolate* isolate = reinterpret_cast<Isolate*>(parameter); | 336 Isolate* isolate = reinterpret_cast<Isolate*>(parameter); |
| 337 SpawnState* state = reinterpret_cast<SpawnState*>(isolate->spawn_data()); | 337 SpawnState* state = reinterpret_cast<SpawnState*>(isolate->spawn_data()); |
| 338 isolate->set_spawn_data(NULL); | 338 isolate->set_spawn_data(0); |
| 339 { | 339 { |
| 340 StartIsolateScope start_scope(isolate); | 340 StartIsolateScope start_scope(isolate); |
| 341 StackZone zone(isolate); | 341 StackZone zone(isolate); |
| 342 HandleScope handle_scope(isolate); | 342 HandleScope handle_scope(isolate); |
| 343 if (!ClassFinalizer::FinalizePendingClasses()) { | 343 if (!ClassFinalizer::FinalizePendingClasses()) { |
| 344 // Error is in sticky error already. | 344 // Error is in sticky error already. |
| 345 return false; | 345 return false; |
| 346 } | 346 } |
| 347 Object& result = Object::Handle(); | 347 Object& result = Object::Handle(); |
| 348 | 348 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 447 |
| 448 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { | 448 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { |
| 449 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); | 449 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); |
| 450 if (port.IsError()) { | 450 if (port.IsError()) { |
| 451 Exceptions::PropagateError(Error::Cast(port)); | 451 Exceptions::PropagateError(Error::Cast(port)); |
| 452 } | 452 } |
| 453 return port.raw(); | 453 return port.raw(); |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace dart | 456 } // namespace dart |
| OLD | NEW |