Index: runtime/bin/io_buffer.cc |
=================================================================== |
--- runtime/bin/io_buffer.cc (revision 23307) |
+++ runtime/bin/io_buffer.cc (working copy) |
@@ -10,9 +10,9 @@ |
Dart_Handle IOBuffer::Allocate(intptr_t size, uint8_t **buffer) { |
uint8_t* data = Allocate(size); |
- Dart_Handle result = Dart_NewExternalTypedData(kUint8, |
- data, size, |
- data, IOBuffer::Finalizer); |
+ Dart_Handle result = Dart_NewExternalTypedData(kUint8, data, size); |
+ Dart_NewWeakPersistentHandle(result, data, IOBuffer::Finalizer); |
+ |
if (Dart_IsError(result)) { |
Free(data); |
Dart_PropagateError(result); |