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

Unified Diff: runtime/vm/isolate.cc

Issue 9288001: Don't access a message after it has been enqueued. It may be deleted (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
===================================================================
--- runtime/vm/isolate.cc (revision 3573)
+++ runtime/vm/isolate.cc (working copy)
@@ -100,9 +100,13 @@
"\tdest_port: %lld\n",
source_name, message->reply_port(), name(), message->dest_port());
}
+
+ Message::Priority priority = message->priority();
message_queue()->Enqueue(message);
- ASSERT(message->priority() < Message::kOOBPriority);
- if (message->priority() >= Message::kOOBPriority) {
+ message = NULL; // Do not access message. May have been deleted.
+
+ ASSERT(priority < Message::kOOBPriority);
siva 2012/01/26 00:01:46 Shouldn't this assert be after the if check?
+ if (priority >= Message::kOOBPriority) {
// Handle out of band messages even if the isolate is busy.
ScheduleInterrupts(Isolate::kMessageInterrupt);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698