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

Unified Diff: runtime/vm/snapshot.cc

Issue 2654443003: Revert "VM: Fix memory leaks during isolate spawning" (Closed)
Patch Set: Created 3 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 | « runtime/vm/snapshot.h ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 669df78bd8ba604dba9ff5513e52cc7db4df7f35..cb9dfde5778a5b8fd62413cb0c0d9ad33d04f408 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -1908,8 +1908,7 @@ void SnapshotWriterVisitor::VisitPointers(RawObject** first, RawObject** last) {
MessageWriter::MessageWriter(uint8_t** buffer,
ReAlloc alloc,
DeAlloc dealloc,
- bool can_send_any_object,
- intptr_t* buffer_len)
+ bool can_send_any_object)
: SnapshotWriter(Thread::Current(),
Snapshot::kMessage,
buffer,
@@ -1918,8 +1917,7 @@ MessageWriter::MessageWriter(uint8_t** buffer,
kInitialSize,
&forward_list_,
can_send_any_object),
- forward_list_(thread(), kMaxPredefinedObjectIds),
- buffer_len_(buffer_len) {
+ forward_list_(thread(), kMaxPredefinedObjectIds) {
ASSERT(buffer != NULL);
ASSERT(alloc != NULL);
}
@@ -1935,9 +1933,6 @@ void MessageWriter::WriteMessage(const Object& obj) {
if (setjmp(*jump.Set()) == 0) {
NoSafepointScope no_safepoint;
WriteObject(obj.raw());
- if (buffer_len_ != NULL) {
- *buffer_len_ = BytesWritten();
- }
} else {
FreeBuffer();
ThrowException(exception_type(), exception_msg());
« no previous file with comments | « runtime/vm/snapshot.h ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698