OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 4639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4650 * A helper class StartupDataDecompressor is provided. It implements | 4650 * A helper class StartupDataDecompressor is provided. It implements |
4651 * the protocol of the interaction described above, and can be used in | 4651 * the protocol of the interaction described above, and can be used in |
4652 * most cases instead of calling these API functions directly. | 4652 * most cases instead of calling these API functions directly. |
4653 */ | 4653 */ |
4654 static StartupData::CompressionAlgorithm GetCompressedStartupDataAlgorithm(); | 4654 static StartupData::CompressionAlgorithm GetCompressedStartupDataAlgorithm(); |
4655 static int GetCompressedStartupDataCount(); | 4655 static int GetCompressedStartupDataCount(); |
4656 static void GetCompressedStartupData(StartupData* compressed_data); | 4656 static void GetCompressedStartupData(StartupData* compressed_data); |
4657 static void SetDecompressedStartupData(StartupData* decompressed_data); | 4657 static void SetDecompressedStartupData(StartupData* decompressed_data); |
4658 | 4658 |
4659 /** | 4659 /** |
4660 * Hand startup data to V8, in case the embedder has chosen to build | |
4661 * V8 with external startup data. | |
4662 * | |
4663 * Note: | |
4664 * - By default the startup data is linked into the V8 library, in which | |
4665 * case this function is not meaningful. | |
4666 * - If this needs to be called, it needs to be called before V8 | |
4667 * tries to make use of its built-ins. | |
4668 * - To avoid unnecessary copies of data, V8 will point directly into the | |
4669 * given data blob, so pretty please keep it around until V8 exit. | |
4670 * - Compression of the startup blob might be useful, but needs to | |
4671 * handled entirely on the embedders' side. | |
4672 * - The call will abort if the data is invalid. | |
4673 */ | |
4674 static void SetNativesDataBlob(StartupData* startup_blob); | |
4675 static void SetSnapshotDataBlob(StartupData* startup_blob); | |
4676 | |
4677 /** | |
4678 * Adds a message listener. | 4660 * Adds a message listener. |
4679 * | 4661 * |
4680 * The same message listener can be added more than once and in that | 4662 * The same message listener can be added more than once and in that |
4681 * case it will be called more than once for each message. | 4663 * case it will be called more than once for each message. |
4682 * | 4664 * |
4683 * If data is specified, it will be passed to the callback when it is called. | 4665 * If data is specified, it will be passed to the callback when it is called. |
4684 * Otherwise, the exception object will be passed to the callback instead. | 4666 * Otherwise, the exception object will be passed to the callback instead. |
4685 */ | 4667 */ |
4686 static bool AddMessageListener(MessageCallback that, | 4668 static bool AddMessageListener(MessageCallback that, |
4687 Handle<Value> data = Handle<Value>()); | 4669 Handle<Value> data = Handle<Value>()); |
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6652 */ | 6634 */ |
6653 | 6635 |
6654 | 6636 |
6655 } // namespace v8 | 6637 } // namespace v8 |
6656 | 6638 |
6657 | 6639 |
6658 #undef TYPE_CHECK | 6640 #undef TYPE_CHECK |
6659 | 6641 |
6660 | 6642 |
6661 #endif // V8_H_ | 6643 #endif // V8_H_ |
OLD | NEW |