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

Unified Diff: runtime/vm/dart_api_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
Index: runtime/vm/dart_api_message.h
===================================================================
--- runtime/vm/dart_api_message.h (revision 10993)
+++ runtime/vm/dart_api_message.h (working copy)
@@ -27,7 +27,7 @@
// Reads a message snapshot into a C structure.
class ApiMessageReader : public BaseReader {
public:
- ApiMessageReader(const uint8_t* buffer, intptr_t length, ReAlloc alloc);
+ ApiMessageReader(const Snapshot* snapshot, ReAlloc alloc);
~ApiMessageReader() { }
Dart_CObject* ReadMessage();
@@ -122,12 +122,12 @@
}
// Writes a message of integers.
- void WriteMessage(intptr_t field_count, intptr_t *data);
+ intptr_t WriteMessage(intptr_t field_count, intptr_t *data);
- void WriteCMessage(Dart_CObject* object);
+ intptr_t WriteCMessage(Dart_CObject* object);
- void FinalizeBuffer() {
- BaseWriter::FinalizeBuffer(Snapshot::kMessage);
+ intptr_t FinalizeBuffer() {
+ return BaseWriter::FinalizeBuffer(Snapshot::kMessage);
}
private:

Powered by Google App Engine
This is Rietveld 408576698