On 2011/06/06 20:37:37, Mikhail Naganov (Chromium) wrote:
A good idea!

I've introduced a base class StartupDataDecompressor in the V8 API that calls API functions in the right sequence. An embedder only needs to subclass from
it
and provide the decompressing function. This is what I'm doing in shell.cc and mksnapshot.cc. A little code duplication has emerged between them, but I think
this is acceptable.

On 2011/06/06 15:59:15, Vitaly Repeshko wrote:
> http://codereview.chromium.org/7066048/diff/7001/samples/shell.cc
> File samples/shell.cc (right):
>
> http://codereview.chromium.org/7066048/diff/7001/samples/shell.cc#newcode312
> samples/shell.cc:312: BZip2Decompressor startup_data_decompressor;
> It seems unfortunate that the shell sample is using something that looks
like
> internal code to demonstrate the compression feature. Could you document
that
> it's safe to use its implementation details? Or how about we expose a
documented
> convenience API DecompressWithCallback?
>
> http://codereview.chromium.org/7066048/diff/7001/src/bz2-decompress.h
> File src/bz2-decompress.h (right):
>
>

http://codereview.chromium.org/7066048/diff/7001/src/bz2-decompress.h#newcode31
> src/bz2-decompress.h:31: class BZip2Decompressor {
> This should be some namespace and should be documented.

Should we add support for compressed startupdata to d8 as well?

http://codereview.chromium.org/7066048/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to