Lines Matching refs:blob
95 Blob * blob = (Blob*) malloc(sizeof(Blob)); in blob_new() local
96 if (!blob) return NULL; in blob_new()
98 blob->data = (char*) malloc(length); in blob_new()
99 if (!blob->data) { in blob_new()
101 free(blob); in blob_new()
106 blob->length = length; in blob_new()
107 blob->refs = 0; in blob_new()
109 return blob; in blob_new()
113 static inline void blob_ref(Blob *blob) { in blob_ref() argument
114 blob->refs++; in blob_ref()
118 static inline void blob_unref(Blob *blob) { in blob_unref() argument
119 assert(blob->refs > 0); in blob_unref()
120 if (--blob->refs == 0) { in blob_unref()
123 V8::AdjustAmountOfExternalAllocatedMemory(-(sizeof(Blob) + blob->length)); in blob_unref()
124 free(blob->data); in blob_unref()
125 free(blob); in blob_unref()
137 blob_ = parent->blob();