OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 #ifndef VM_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
6 #define VM_ISOLATE_H_ | 6 #define VM_ISOLATE_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/thread.h" | 10 #include "platform/thread.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 return gc_epilogue_callbacks_; | 292 return gc_epilogue_callbacks_; |
293 } | 293 } |
294 | 294 |
295 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { | 295 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { |
296 create_callback_ = cb; | 296 create_callback_ = cb; |
297 } | 297 } |
298 static Dart_IsolateCreateCallback CreateCallback() { | 298 static Dart_IsolateCreateCallback CreateCallback() { |
299 return create_callback_; | 299 return create_callback_; |
300 } | 300 } |
301 | 301 |
| 302 static void SetServiceCreateCallback(Dart_ServiceIsolateCreateCalback cb) { |
| 303 service_create_callback_ = cb; |
| 304 } |
| 305 static Dart_ServiceIsolateCreateCalback ServiceCreateCallback() { |
| 306 return service_create_callback_; |
| 307 } |
| 308 |
302 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { | 309 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { |
303 interrupt_callback_ = cb; | 310 interrupt_callback_ = cb; |
304 } | 311 } |
305 static Dart_IsolateInterruptCallback InterruptCallback() { | 312 static Dart_IsolateInterruptCallback InterruptCallback() { |
306 return interrupt_callback_; | 313 return interrupt_callback_; |
307 } | 314 } |
308 | 315 |
309 static void SetVmStatsCallback(Dart_IsolateInterruptCallback cb) { | 316 static void SetVmStatsCallback(Dart_IsolateInterruptCallback cb) { |
310 vmstats_callback_ = cb; | 317 vmstats_callback_ = cb; |
311 } | 318 } |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 static Dart_IsolateCreateCallback create_callback_; | 479 static Dart_IsolateCreateCallback create_callback_; |
473 static Dart_IsolateInterruptCallback interrupt_callback_; | 480 static Dart_IsolateInterruptCallback interrupt_callback_; |
474 static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_; | 481 static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_; |
475 static Dart_IsolateShutdownCallback shutdown_callback_; | 482 static Dart_IsolateShutdownCallback shutdown_callback_; |
476 static Dart_FileOpenCallback file_open_callback_; | 483 static Dart_FileOpenCallback file_open_callback_; |
477 static Dart_FileReadCallback file_read_callback_; | 484 static Dart_FileReadCallback file_read_callback_; |
478 static Dart_FileWriteCallback file_write_callback_; | 485 static Dart_FileWriteCallback file_write_callback_; |
479 static Dart_FileCloseCallback file_close_callback_; | 486 static Dart_FileCloseCallback file_close_callback_; |
480 static Dart_EntropySource entropy_source_callback_; | 487 static Dart_EntropySource entropy_source_callback_; |
481 static Dart_IsolateInterruptCallback vmstats_callback_; | 488 static Dart_IsolateInterruptCallback vmstats_callback_; |
| 489 static Dart_ServiceIsolateCreateCalback service_create_callback_; |
482 | 490 |
483 friend class ReusableHandleScope; | 491 friend class ReusableHandleScope; |
484 friend class ReusableObjectHandleScope; | 492 friend class ReusableObjectHandleScope; |
485 DISALLOW_COPY_AND_ASSIGN(Isolate); | 493 DISALLOW_COPY_AND_ASSIGN(Isolate); |
486 }; | 494 }; |
487 | 495 |
488 | 496 |
489 // When we need to execute code in an isolate, we use the | 497 // When we need to execute code in an isolate, we use the |
490 // StartIsolateScope. | 498 // StartIsolateScope. |
491 class StartIsolateScope { | 499 class StartIsolateScope { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 char* script_url_; | 582 char* script_url_; |
575 char* library_url_; | 583 char* library_url_; |
576 char* class_name_; | 584 char* class_name_; |
577 char* function_name_; | 585 char* function_name_; |
578 char* exception_callback_name_; | 586 char* exception_callback_name_; |
579 }; | 587 }; |
580 | 588 |
581 } // namespace dart | 589 } // namespace dart |
582 | 590 |
583 #endif // VM_ISOLATE_H_ | 591 #endif // VM_ISOLATE_H_ |
OLD | NEW |