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

Unified Diff: runtime/bin/dartutils.h

Issue 11438045: Make all allocation of external arrays used for IO use the IOBuffer class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « no previous file | runtime/bin/dartutils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.h
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index 5ad0b9f54310dd182835457fda6732f81807a83f..e027d8ae89da7abc55e5be2ffe6c6ee77c476b8e 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -231,6 +231,8 @@ class CObject {
uint8_t* data,
void* peer,
Dart_PeerFinalizer callback);
+ static Dart_CObject* NewIOBuffer(int64_t length);
+ static void FreeIOBufferData(Dart_CObject* object);
Dart_CObject* AsApiCObject() { return cobject_; }
@@ -404,6 +406,9 @@ class CObjectExternalUint8Array : public CObject {
DECLARE_COBJECT_CONSTRUCTORS(ExternalUint8Array)
int Length() const { return cobject_->value.as_external_byte_array.length; }
+ void SetLength(uint64_t length) {
+ cobject_->value.as_external_byte_array.length = length;
+ }
uint8_t* Data() const { return cobject_->value.as_external_byte_array.data; }
void* Peer() const { return cobject_->value.as_external_byte_array.peer; }
Dart_PeerFinalizer Callback() const {
« no previous file with comments | « no previous file | runtime/bin/dartutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698