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

Unified Diff: runtime/bin/io_buffer.cc

Issue 15772005: - Add different types for persistent and weak persistent handles (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/bin/io_buffer.h ('k') | runtime/bin/isolate_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « runtime/bin/io_buffer.h ('k') | runtime/bin/isolate_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698