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

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

Issue 2644683003: Fix vmservice shutdown hang (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | 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/isolate.h" 10 #include "vm/isolate.h"
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 const Library& vmservice_library = 542 const Library& vmservice_library =
543 Library::Handle(Library::LookupLibrary(thread, Symbols::DartVMService())); 543 Library::Handle(Library::LookupLibrary(thread, Symbols::DartVMService()));
544 ASSERT(!vmservice_library.IsNull()); 544 ASSERT(!vmservice_library.IsNull());
545 const String& boot_function_name = String::Handle(String::New("boot")); 545 const String& boot_function_name = String::Handle(String::New("boot"));
546 const Function& boot_function = Function::Handle( 546 const Function& boot_function = Function::Handle(
547 vmservice_library.LookupFunctionAllowPrivate(boot_function_name)); 547 vmservice_library.LookupFunctionAllowPrivate(boot_function_name));
548 ASSERT(!boot_function.IsNull()); 548 ASSERT(!boot_function.IsNull());
549 const Object& result = Object::Handle( 549 const Object& result = Object::Handle(
550 DartEntry::InvokeFunction(boot_function, Object::empty_array())); 550 DartEntry::InvokeFunction(boot_function, Object::empty_array()));
551 ASSERT(!result.IsNull()); 551 ASSERT(!result.IsNull());
552 if (result.IsUnwindError() || result.IsUnhandledException()) {
553 Exceptions::PropagateError(Error::Cast(result));
554 }
552 Dart_Port port = ILLEGAL_PORT; 555 Dart_Port port = ILLEGAL_PORT;
553 if (result.IsReceivePort()) { 556 if (result.IsReceivePort()) {
554 port = ReceivePort::Cast(result).Id(); 557 port = ReceivePort::Cast(result).Id();
555 } 558 }
556 ASSERT(port != ILLEGAL_PORT); 559 ASSERT(port != ILLEGAL_PORT);
557 ServiceIsolate::SetServicePort(port); 560 ServiceIsolate::SetServicePort(port);
558 } 561 }
559 562
560 563
561 void ServiceIsolate::VisitObjectPointers(ObjectPointerVisitor* visitor) {} 564 void ServiceIsolate::VisitObjectPointers(ObjectPointerVisitor* visitor) {}
562 565
563 } // namespace dart 566 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698