Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 4ab1ec2b4f8c54c83f36f4ee2ecd53ddec1be599..3c496161a5e7f0e8a2ad0658d7f88cbcbdac3ea1 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -2641,6 +2641,15 @@ class V8EXPORT Isolate { |
| }; |
| +class StartupData { |
| + public: |
| + int id; |
|
Søren Thygesen Gjesse
2011/04/29 06:50:29
Is this id actually required?
mnaganov (inactive)
2011/04/29 12:07:58
I think, no. As we don't expose to embedder what t
|
| + const char* data; |
| + int compressed_size; |
| + int decompressed_size; |
|
Søren Thygesen Gjesse
2011/04/29 06:50:29
Should the compression algorithm be exposed here (
mnaganov (inactive)
2011/04/29 12:07:58
Makes sense. But not for every resource, as it is
|
| +}; |
| + |
| + |
| /** |
| * Container class for static utility functions. |
| */ |
| @@ -2670,6 +2679,25 @@ class V8EXPORT V8 { |
| static bool IsDead(); |
| /** |
| + * The following 3 functions are to be used when V8 is built with |
|
Søren Thygesen Gjesse
2011/04/29 06:50:29
with -> with the
mnaganov (inactive)
2011/04/29 12:07:58
Done.
|
| + * 'compress_startup_data' flag enabled. In this case, the embedder |
| + * must decompress startup data prior to initializing V8. |
| + * |
| + * This is how interaction with V8 should look like: |
| + * int compressed_data_count = v8::V8::GetCompressedStartupDataCount(); |
| + * v8::StartupData* compressed_data = |
| + * new v8::StartupData[compressed_data_count]; |
| + * v8::V8::GetCompressedStartupData(compressed_data); |
| + * ... decompress data (compressed_data can be updated in-place) ... |
| + * v8::V8::SetDecompressedStartupData(compressed_data); |
| + * ... now V8 can be initialized |
| + * ... make sure the decompressed data stays valid until V8 shutdown |
| + */ |
| + static int GetCompressedStartupDataCount(); |
| + static void GetCompressedStartupData(StartupData* compressed_data); |
| + static void SetDecompressedStartupData(StartupData* decompressed_data); |
| + |
| + /** |
| * Adds a message listener. |
| * |
| * The same message listener can be added more than once and it that |