| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 "vm/service_isolate.h" | 5 #include "vm/service_isolate.h" |
| 6 | 6 |
| 7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
| 8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 StartIsolateScope start_scope(I); | 375 StartIsolateScope start_scope(I); |
| 376 Thread* T = Thread::Current(); | 376 Thread* T = Thread::Current(); |
| 377 ASSERT(I == T->isolate()); | 377 ASSERT(I == T->isolate()); |
| 378 StackZone zone(T); | 378 StackZone zone(T); |
| 379 HandleScope handle_scope(T); | 379 HandleScope handle_scope(T); |
| 380 Error& error = Error::Handle(Z); | 380 Error& error = Error::Handle(Z); |
| 381 error = T->sticky_error(); | 381 error = T->sticky_error(); |
| 382 if (!error.IsNull() && !error.IsUnwindError()) { | 382 if (!error.IsNull() && !error.IsUnwindError()) { |
| 383 OS::PrintErr("vm-service: Error: %s\n", error.ToErrorCString()); | 383 OS::PrintErr("vm-service: Error: %s\n", error.ToErrorCString()); |
| 384 } | 384 } |
| 385 error = I->sticky_error(); |
| 386 if (!error.IsNull() && !error.IsUnwindError()) { |
| 387 OS::PrintErr("vm-service: Error: %s\n", error.ToErrorCString()); |
| 388 } |
| 385 Dart::RunShutdownCallback(); | 389 Dart::RunShutdownCallback(); |
| 386 } | 390 } |
| 387 // Shut the isolate down. | 391 // Shut the isolate down. |
| 388 Dart::ShutdownIsolate(I); | 392 Dart::ShutdownIsolate(I); |
| 389 if (FLAG_trace_service) { | 393 if (FLAG_trace_service) { |
| 390 OS::Print("vm-service: Shutdown.\n"); | 394 OS::Print("vm-service: Shutdown.\n"); |
| 391 } | 395 } |
| 392 ServiceIsolate::FinishedExiting(); | 396 ServiceIsolate::FinishedExiting(); |
| 393 } | 397 } |
| 394 | 398 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 ASSERT(!result.IsNull()); | 521 ASSERT(!result.IsNull()); |
| 518 Dart_Port port = ILLEGAL_PORT; | 522 Dart_Port port = ILLEGAL_PORT; |
| 519 if (result.IsReceivePort()) { | 523 if (result.IsReceivePort()) { |
| 520 port = ReceivePort::Cast(result).Id(); | 524 port = ReceivePort::Cast(result).Id(); |
| 521 } | 525 } |
| 522 ASSERT(port != ILLEGAL_PORT); | 526 ASSERT(port != ILLEGAL_PORT); |
| 523 ServiceIsolate::SetServicePort(port); | 527 ServiceIsolate::SetServicePort(port); |
| 524 } | 528 } |
| 525 | 529 |
| 526 } // namespace dart | 530 } // namespace dart |
| OLD | NEW |