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

Unified Diff: runtime/vm/message.h

Issue 10829444: Avoid trusting the length encoded in the Snapshot if there is an (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/isolate.cc ('k') | runtime/vm/message_handler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/message.h
===================================================================
--- runtime/vm/message.h (revision 11409)
+++ runtime/vm/message.h (working copy)
@@ -32,11 +32,12 @@
//
// If reply_port is kIllegalPort, then there is no reply port.
Message(Dart_Port dest_port, Dart_Port reply_port,
- uint8_t* data, Priority priority)
+ uint8_t* data, intptr_t len, Priority priority)
: next_(NULL),
dest_port_(dest_port),
reply_port_(reply_port),
data_(data),
+ len_(len),
priority_(priority) {}
~Message() {
free(data_);
@@ -45,6 +46,7 @@
Dart_Port dest_port() const { return dest_port_; }
Dart_Port reply_port() const { return reply_port_; }
uint8_t* data() const { return data_; }
+ intptr_t len() const { return len_; }
Priority priority() const { return priority_; }
bool IsOOB() const { return priority_ == Message::kOOBPriority; }
@@ -56,6 +58,7 @@
Dart_Port dest_port_;
Dart_Port reply_port_;
uint8_t* data_;
+ intptr_t len_;
Priority priority_;
DISALLOW_COPY_AND_ASSIGN(Message);
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/message_handler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698