Hi ry It's great that you want to take a shot at this. The approach to implementing Blobs outlined in the bug report (http://code.google.com/p/v8/issues/detail?id=270) uses the internal ByteArray type the same way the api's External type is backed by the internal Proxy type. This means that you won't be able to pass a Blob into javascript directly but have to wrap it as an internal object field in an Object.
Since this is the same approach used to implement External you can use that implementation as a guide. At the api level (include/v8.h) you need at least the following: - A class Blob which is a subclass of Value. - A cast operator, Blob::Cast - An allocation operation, Blob::New - A query operator, Value::IsBlob. - Methods for operating on Blobs - Unit tests in test/cctest/test-api.cc The implementation of these methods should be in api.h and api.cc. In those files you can see how External is implemented on top of Proxy and the implementation of Blob should follow the same pattern, based on ByteArray. Some of the operations, Blob::New, Blob::Cast and Value::IsBlob should be almost identical to the corresponding External methods. The methods that operate on blobs can be implemented using the member methods on ByteArray which is defined in objects.h. This is just a short overview but I'm available to answer any questions you might have. When you're ready to create a changlist you can set me as the reviewer (see http://dev.chromium.org/developers/contributing-code). -- Christian --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
