Index: runtime/vm/message.cc |
diff --git a/runtime/vm/message.cc b/runtime/vm/message.cc |
index 54f40b4eeb77c91cee4a35bbd2c5d356a0e75b48..195b2c6c81bd9abddc8e87f894d3b04f8655ec18 100644 |
--- a/runtime/vm/message.cc |
+++ b/runtime/vm/message.cc |
@@ -203,9 +203,9 @@ void MessageQueue::PrintJSON(JSONStream* stream) { |
// TODO(johnmccutchan): Move port -> handler map out of Dart and into the |
// VM, that way we can lookup the handler without invoking Dart code. |
msg_handler = DartLibraryCalls::LookupHandler(current->dest_port()); |
- if (msg_handler.IsInstance() && Instance::Cast(msg_handler).IsClosure()) { |
+ if (msg_handler.IsClosure()) { |
// Grab function from closure. |
- msg_handler = Closure::function(Instance::Cast(msg_handler)); |
+ msg_handler = Closure::Cast(msg_handler).function(); |
} |
if (msg_handler.IsFunction()) { |
const Function& function = Function::Cast(msg_handler); |