Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(598)

Side by Side Diff: runtime/vm/service_isolate.cc

Issue 1418833004: VM: Service isolate under precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 SwitchIsolateScope switch_scope(I); 365 SwitchIsolateScope switch_scope(I);
366 Dart::ShutdownIsolate(); 366 Dart::ShutdownIsolate();
367 } 367 }
368 if (FLAG_trace_service) { 368 if (FLAG_trace_service) {
369 OS::Print("vm-service: Shutdown.\n"); 369 OS::Print("vm-service: Shutdown.\n");
370 } 370 }
371 ServiceIsolate::FinishedExiting(); 371 ServiceIsolate::FinishedExiting();
372 } 372 }
373 373
374 void RunMain(Isolate* I) { 374 void RunMain(Isolate* I) {
375 if (Dart::IsRunningPrecompiledCode()) {
376 // TODO(24651): Remove this.
377 return;
378 }
379
380 StartIsolateScope iso_scope(I); 375 StartIsolateScope iso_scope(I);
381 Thread* T = Thread::Current(); 376 Thread* T = Thread::Current();
382 ASSERT(I == T->isolate()); 377 ASSERT(I == T->isolate());
383 StackZone zone(T); 378 StackZone zone(T);
384 HANDLESCOPE(T); 379 HANDLESCOPE(T);
385 // Invoke main which will return the loadScriptPort. 380 // Invoke main which will return the loadScriptPort.
386 const Library& root_library = Library::Handle(Z, 381 const Library& root_library = Library::Handle(Z,
387 I->object_store()->root_library()); 382 I->object_store()->root_library());
388 if (root_library.IsNull()) { 383 if (root_library.IsNull()) {
389 if (FLAG_trace_service) { 384 if (FLAG_trace_service) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 ASSERT(!result.IsNull()); 488 ASSERT(!result.IsNull());
494 Dart_Port port = ILLEGAL_PORT; 489 Dart_Port port = ILLEGAL_PORT;
495 if (result.IsReceivePort()) { 490 if (result.IsReceivePort()) {
496 port = ReceivePort::Cast(result).Id(); 491 port = ReceivePort::Cast(result).Id();
497 } 492 }
498 ASSERT(port != ILLEGAL_PORT); 493 ASSERT(port != ILLEGAL_PORT);
499 ServiceIsolate::SetServicePort(port); 494 ServiceIsolate::SetServicePort(port);
500 } 495 }
501 496
502 } // namespace dart 497 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698