Index: tonic/dart_message_handler.h |
diff --git a/tonic/dart_message_handler.h b/tonic/dart_message_handler.h |
index 5cb2f9aad94c2be758c8a09a46ba659794a5b16f..a6ab3d3122070bc6a9775411665d5ba852ddf463 100644 |
--- a/tonic/dart_message_handler.h |
+++ b/tonic/dart_message_handler.h |
@@ -20,6 +20,27 @@ class DartMessageHandler { |
// Messages for the current isolate will be scheduled on |runner|. |
void Initialize(const scoped_refptr<base::SingleThreadTaskRunner>& runner); |
+ // Request the message loop to quit when isolate exits? Default is true. |
+ void set_quit_message_loop_when_isolate_exits( |
+ bool quit_message_loop_when_isolate_exits) { |
+ quit_message_loop_when_isolate_exits_ = |
+ quit_message_loop_when_isolate_exits; |
+ } |
+ |
+ bool quit_message_loop_when_isolate_exits() const { |
+ return quit_message_loop_when_isolate_exits_; |
+ } |
+ |
+ // Did the isolate exit? |
+ bool isolate_exited() const { |
+ return isolate_exited_; |
+ } |
+ |
+ // Did the isolate have an uncaught exception error? |
+ bool isolate_had_uncaught_exception_error() const { |
+ return isolate_had_uncaught_exception_error_; |
+ } |
+ |
protected: |
// Called from an unknown thread for each message. |
void OnMessage(DartState* dart_state); |
@@ -39,6 +60,9 @@ class DartMessageHandler { |
} |
bool handled_first_message_; |
+ bool quit_message_loop_when_isolate_exits_; |
+ bool isolate_exited_; |
+ bool isolate_had_uncaught_exception_error_; |
scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
private: |