| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 port_ = port; | 513 port_ = port; |
| 514 } | 514 } |
| 515 | 515 |
| 516 | 516 |
| 517 void ServiceIsolate::SetServiceIsolate(Isolate* isolate) { | 517 void ServiceIsolate::SetServiceIsolate(Isolate* isolate) { |
| 518 MonitorLocker ml(monitor_); | 518 MonitorLocker ml(monitor_); |
| 519 isolate_ = isolate; | 519 isolate_ = isolate; |
| 520 if (isolate_ != NULL) { | 520 if (isolate_ != NULL) { |
| 521 isolate_->is_service_isolate_ = true; | 521 isolate_->is_service_isolate_ = true; |
| 522 origin_ = isolate_->origin_id(); | 522 origin_ = isolate_->origin_id(); |
| 523 } else { | |
| 524 origin_ = ILLEGAL_PORT; | |
| 525 } | 523 } |
| 526 } | 524 } |
| 527 | 525 |
| 528 void ServiceIsolate::SetLoadPort(Dart_Port port) { | 526 void ServiceIsolate::SetLoadPort(Dart_Port port) { |
| 529 MonitorLocker ml(monitor_); | 527 MonitorLocker ml(monitor_); |
| 530 load_port_ = port; | 528 load_port_ = port; |
| 531 } | 529 } |
| 532 | 530 |
| 533 | 531 |
| 534 void ServiceIsolate::MaybeInjectVMServiceLibrary(Isolate* I) { | 532 void ServiceIsolate::MaybeInjectVMServiceLibrary(Isolate* I) { |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 return result; | 845 return result; |
| 848 } | 846 } |
| 849 Dart_Handle source = GetSource(url_string); | 847 Dart_Handle source = GetSource(url_string); |
| 850 if (Dart_IsError(source)) { | 848 if (Dart_IsError(source)) { |
| 851 return source; | 849 return source; |
| 852 } | 850 } |
| 853 return Dart_LoadSource(library, url, source, 0, 0); | 851 return Dart_LoadSource(library, url, source, 0, 0); |
| 854 } | 852 } |
| 855 | 853 |
| 856 } // namespace dart | 854 } // namespace dart |
| OLD | NEW |