Remove dead code

v0.7.4-release
Ryan Dahl 2010-09-07 23:31:04 -07:00
parent efc723787a
commit 380d12832c
1 changed files with 0 additions and 34 deletions

View File

@ -125,40 +125,6 @@ static size_t ByteLength (Handle<String> string, enum encoding enc) {
}
#if 0
// When someone calls buffer.asciiSlice, data is not copied. Instead V8
// references in the underlying Blob with this ExternalAsciiStringResource.
class AsciiSliceExt: public String::ExternalAsciiStringResource {
friend class Buffer;
public:
AsciiSliceExt(Buffer *parent, size_t start, size_t end) {
blob_ = parent->blob();
blob_ref(blob_);
assert(start <= end);
length_ = end - start;
assert(start + length_ <= parent->length());
data_ = parent->data() + start;
}
~AsciiSliceExt() {
//fprintf(stderr, "free ascii slice (%d refs left)\n", blob_->refs);
blob_unref(blob_);
}
const char* data() const { return data_; }
size_t length() const { return length_; }
private:
const char *data_;
size_t length_;
Blob *blob_;
};
#endif
Buffer* Buffer::New(size_t size) {
HandleScope scope;