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

Unified Diff: runtime/vm/isolate.h

Issue 9182001: OOB messages and general message refactor. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
===================================================================
--- runtime/vm/isolate.h (revision 3557)
+++ runtime/vm/isolate.h (working copy)
@@ -21,6 +21,7 @@
class HandleVisitor;
class Heap;
class LongJump;
+class Message;
class MessageQueue;
class Mutex;
class ObjectPointerVisitor;
@@ -49,20 +50,13 @@
StoreBufferBlock* store_buffer() { return &store_buffer_; }
- Dart_PostMessageCallback post_message_callback() const {
- return post_message_callback_;
+ Dart_MessageNotifyCallback message_notify_callback() const {
+ return message_notify_callback_;
}
- void set_post_message_callback(Dart_PostMessageCallback value) {
- post_message_callback_ = value;
+ void set_message_notify_callback(Dart_MessageNotifyCallback value) {
+ message_notify_callback_ = value;
}
- Dart_ClosePortCallback close_port_callback() const {
- return close_port_callback_;
- }
- void set_close_port_callback(Dart_ClosePortCallback value) {
- close_port_callback_ = value;
- }
-
MessageQueue* message_queue() const { return message_queue_; }
void set_message_queue(MessageQueue* value) { message_queue_ = value; }
@@ -238,14 +232,19 @@
uword saved_stack_limit() const { return saved_stack_limit_; }
enum {
- kInterruptsMask = 0x1,
- kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate.
- // More interrupt types will go here.
+ kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate.
+ kMessageInterrupt = 0x2, // An interrupt to process an out of band message.
+
+ kInterruptsMask = kApiInterrupt | kMessageInterrupt,
};
void ScheduleInterrupts(uword interrupt_bits);
uword GetAndClearInterrupts();
+ void PostMessage(Message* message);
+ void ClosePort(Dart_Port port);
+ void CloseAllPorts();
+
// Returns null on success, unhandled exception on failure.
RawObject* StandardRunLoop();
@@ -273,8 +272,7 @@
StoreBufferBlock store_buffer_;
MessageQueue* message_queue_;
- Dart_PostMessageCallback post_message_callback_;
- Dart_ClosePortCallback close_port_callback_;
+ Dart_MessageNotifyCallback message_notify_callback_;
char* name_;
intptr_t num_ports_;
intptr_t live_ports_;
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698