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

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
Index: runtime/vm/isolate.h
===================================================================
--- runtime/vm/isolate.h (revision 3210)
+++ runtime/vm/isolate.h (working copy)
@@ -20,6 +20,7 @@
class HandleScope;
class Heap;
class LongJump;
+class Message;
class MessageQueue;
class Mutex;
class ObjectPointerVisitor;
@@ -51,20 +52,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,18 @@
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.
+ kInterruptsMask = 0x3,
Anton Muhin 2012/01/12 12:58:16 maybe kInterruptsMask = kApiInterrupt | kMessageIn
turnidge 2012/01/12 19:01:55 Done.
+ kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate.
+ kMessageInterrupt = 0x2, // An interrupt to process an out of band message.
};
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();
@@ -272,8 +270,7 @@
StoreBufferBlock store_buffer_;
MessageQueue* message_queue_;
- Dart_PostMessageCallback post_message_callback_;
- Dart_ClosePortCallback close_port_callback_;
+ Dart_MessageNotifyCallback message_notify_callback_;
intptr_t num_ports_;
intptr_t live_ports_;
Dart_Port main_port_;

Powered by Google App Engine
This is Rietveld 408576698