Chromium Code Reviews
DescriptionAllow embedders to provide custom message delivery for an isolate.
==============
Added Dart_SetPostMessageCallback and Dart_SetClosePortCallback.
These allow the embedder to provide custom message/port behavior
for their application. The vm provides standard implementations
that work with the standard run loop.
Added Dart_HandleMessage, which processes one message on the
current isolate. Embedders can use this to write their own
message processing loops. Rewrote code to use this internally.
Added Isolate::StandardRunLoop() to share code between
Dart_RunLoop and lib/isolate.cc
Changed the interface to PortMap::PostMessage. PostMessage is
now agnostic to message delivery mechanism. Note that PortMap is
now out of the "ReceiveMessage" business entirely. Moved
MessageQueue and friends out to message_queue.cc/h.
Moved the monitor from the Isolate into the MessageQueue. No
need for outsiders to mess. Added MessageQueue::Wait. Moved
monitor locking from PortMap into MessageQueue itself, which was
easier for me to reason about. Wrote some tests.
Removed PortMessage::Handle. The code turned into Dart_HandleMessage.
Regularized the nomenclature around ports. Type is now always
Dart_Port instead of intptr_t. Variables end in _port instead of
_id. Use the term "dest" instead of "target" or "send".
Added a family of new tests to port_test.
Added EXPECT_NE to the test framework.
Committed: https://code.google.com/p/dart/source/detail?r=516
Patch Set 1 #
Total comments: 42
Patch Set 2 : '' #
Total comments: 33
Patch Set 3 : '' #
Total comments: 24
Patch Set 4 : '' #Patch Set 5 : '' #
Messages
Total messages: 11 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||