| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 // Shut the isolate down. | 363 // Shut the isolate down. |
| 364 Dart::ShutdownIsolate(); | 364 Dart::ShutdownIsolate(); |
| 365 } | 365 } |
| 366 if (FLAG_trace_service) { | 366 if (FLAG_trace_service) { |
| 367 OS::Print("vm-service: Shutdown.\n"); | 367 OS::Print("vm-service: Shutdown.\n"); |
| 368 } | 368 } |
| 369 ServiceIsolate::FinishedExiting(); | 369 ServiceIsolate::FinishedExiting(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 void RunMain(Isolate* I) { | 372 void RunMain(Isolate* I) { |
| 373 if (Dart::IsRunningPrecompiledCode()) { | |
| 374 // TODO(24651): Remove this. | |
| 375 return; | |
| 376 } | |
| 377 Thread* T = Thread::Current(); | 373 Thread* T = Thread::Current(); |
| 378 ASSERT(I == T->isolate()); | 374 ASSERT(I == T->isolate()); |
| 379 StackZone zone(T); | 375 StackZone zone(T); |
| 380 HANDLESCOPE(T); | 376 HANDLESCOPE(T); |
| 381 // Invoke main which will return the loadScriptPort. | 377 // Invoke main which will return the loadScriptPort. |
| 382 const Library& root_library = Library::Handle(Z, | 378 const Library& root_library = Library::Handle(Z, |
| 383 I->object_store()->root_library()); | 379 I->object_store()->root_library()); |
| 384 if (root_library.IsNull()) { | 380 if (root_library.IsNull()) { |
| 385 if (FLAG_trace_service) { | 381 if (FLAG_trace_service) { |
| 386 OS::Print("vm-service: Embedder did not install a script."); | 382 OS::Print("vm-service: Embedder did not install a script."); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 ASSERT(!result.IsNull()); | 485 ASSERT(!result.IsNull()); |
| 490 Dart_Port port = ILLEGAL_PORT; | 486 Dart_Port port = ILLEGAL_PORT; |
| 491 if (result.IsReceivePort()) { | 487 if (result.IsReceivePort()) { |
| 492 port = ReceivePort::Cast(result).Id(); | 488 port = ReceivePort::Cast(result).Id(); |
| 493 } | 489 } |
| 494 ASSERT(port != ILLEGAL_PORT); | 490 ASSERT(port != ILLEGAL_PORT); |
| 495 ServiceIsolate::SetServicePort(port); | 491 ServiceIsolate::SetServicePort(port); |
| 496 } | 492 } |
| 497 | 493 |
| 498 } // namespace dart | 494 } // namespace dart |
| OLD | NEW |