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

Unified Diff: runtime/vm/object.cc

Issue 1056223002: Fix crash when posting a message to a send port with port id 0. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/port.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index c1b31428464d8f71ace98f290d306ceaae8d3b8f..5f4e4c23c99ce9d6fa06ce491a99323f6a1d55f0 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -20070,6 +20070,7 @@ void Capability::PrintJSONImpl(JSONStream* stream, bool ref) const {
RawReceivePort* ReceivePort::New(Dart_Port id,
bool is_control_port,
Heap::Space space) {
+ ASSERT(id != ILLEGAL_PORT);
Isolate* isolate = Isolate::Current();
const SendPort& send_port =
SendPort::Handle(isolate, SendPort::New(id, isolate->origin_id()));
@@ -20110,6 +20111,7 @@ RawSendPort* SendPort::New(Dart_Port id, Heap::Space space) {
RawSendPort* SendPort::New(Dart_Port id,
Dart_Port origin_id,
Heap::Space space) {
+ ASSERT(id != ILLEGAL_PORT);
SendPort& result = SendPort::Handle();
{
RawObject* raw = Object::Allocate(SendPort::kClassId,
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698