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

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

Issue 2050393002: WIP: DevFS initial implementation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months 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
« no previous file with comments | « runtime/vm/service_isolate.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/dev_fs.h"
10 #include "vm/isolate.h" 11 #include "vm/isolate.h"
11 #include "vm/lockers.h" 12 #include "vm/lockers.h"
12 #include "vm/message.h" 13 #include "vm/message.h"
13 #include "vm/message_handler.h" 14 #include "vm/message_handler.h"
14 #include "vm/native_entry.h" 15 #include "vm/native_entry.h"
15 #include "vm/native_arguments.h" 16 #include "vm/native_arguments.h"
16 #include "vm/object.h" 17 #include "vm/object.h"
17 #include "vm/object_store.h" 18 #include "vm/object_store.h"
18 #include "vm/port.h" 19 #include "vm/port.h"
19 #include "vm/service.h" 20 #include "vm/service.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 }; 451 };
451 452
452 453
453 void ServiceIsolate::Run() { 454 void ServiceIsolate::Run() {
454 ASSERT(monitor_ == NULL); 455 ASSERT(monitor_ == NULL);
455 monitor_ = new Monitor(); 456 monitor_ = new Monitor();
456 ASSERT(monitor_ != NULL); 457 ASSERT(monitor_ != NULL);
457 // Grab the isolate create callback here to avoid race conditions with tests 458 // Grab the isolate create callback here to avoid race conditions with tests
458 // that change this after Dart_Initialize returns. 459 // that change this after Dart_Initialize returns.
459 create_callback_ = Isolate::CreateCallback(); 460 create_callback_ = Isolate::CreateCallback();
461 DevFS::Init();
460 Dart::thread_pool()->Run(new RunServiceTask()); 462 Dart::thread_pool()->Run(new RunServiceTask());
461 } 463 }
462 464
463 465
464 void ServiceIsolate::KillServiceIsolate() { 466 void ServiceIsolate::KillServiceIsolate() {
465 if (!FLAG_shutdown) { 467 if (!FLAG_shutdown) {
466 return; 468 return;
467 } 469 }
468 { 470 {
469 MonitorLocker ml(monitor_); 471 MonitorLocker ml(monitor_);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 DartEntry::InvokeFunction(boot_function, Object::empty_array())); 525 DartEntry::InvokeFunction(boot_function, Object::empty_array()));
524 ASSERT(!result.IsNull()); 526 ASSERT(!result.IsNull());
525 Dart_Port port = ILLEGAL_PORT; 527 Dart_Port port = ILLEGAL_PORT;
526 if (result.IsReceivePort()) { 528 if (result.IsReceivePort()) {
527 port = ReceivePort::Cast(result).Id(); 529 port = ReceivePort::Cast(result).Id();
528 } 530 }
529 ASSERT(port != ILLEGAL_PORT); 531 ASSERT(port != ILLEGAL_PORT);
530 ServiceIsolate::SetServicePort(port); 532 ServiceIsolate::SetServicePort(port);
531 } 533 }
532 534
535
536 void ServiceIsolate::VisitObjectPointers(ObjectPointerVisitor* visitor) {
537 DevFS::VisitObjectPointers(visitor);
538 }
539
533 } // namespace dart 540 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/service_isolate.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698