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 4633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4644 * A helper class StartupDataDecompressor is provided. It implements | 4644 * A helper class StartupDataDecompressor is provided. It implements |
4645 * the protocol of the interaction described above, and can be used in | 4645 * the protocol of the interaction described above, and can be used in |
4646 * most cases instead of calling these API functions directly. | 4646 * most cases instead of calling these API functions directly. |
4647 */ | 4647 */ |
4648 static StartupData::CompressionAlgorithm GetCompressedStartupDataAlgorithm(); | 4648 static StartupData::CompressionAlgorithm GetCompressedStartupDataAlgorithm(); |
4649 static int GetCompressedStartupDataCount(); | 4649 static int GetCompressedStartupDataCount(); |
4650 static void GetCompressedStartupData(StartupData* compressed_data); | 4650 static void GetCompressedStartupData(StartupData* compressed_data); |
4651 static void SetDecompressedStartupData(StartupData* decompressed_data); | 4651 static void SetDecompressedStartupData(StartupData* decompressed_data); |
4652 | 4652 |
4653 /** | 4653 /** |
| 4654 * Hand startup data to V8, in case the embedder has chosen to build |
| 4655 * V8 with external startup data. |
| 4656 * |
| 4657 * Note: |
| 4658 * - By default the startup data is linked into the V8 library, in which |
| 4659 * case this function is not meaningful. |
| 4660 * - If this needs to be called, it needs to be called before V8 |
| 4661 * tries to make use of its built-ins. |
| 4662 * - To avoid unnecessary copies of data, V8 will point directly into the |
| 4663 * given data blob, so pretty please keep it around until V8 exit. |
| 4664 * - Compression of the startup blob might be useful, but needs to |
| 4665 * handled entirely on the embedders' side. |
| 4666 * - The call will abort if the data is invalid. |
| 4667 */ |
| 4668 static void SetNativesDataBlob(StartupData* startup_blob); |
| 4669 static void SetSnapshotDataBlob(StartupData* startup_blob); |
| 4670 |
| 4671 /** |
4654 * Adds a message listener. | 4672 * Adds a message listener. |
4655 * | 4673 * |
4656 * The same message listener can be added more than once and in that | 4674 * The same message listener can be added more than once and in that |
4657 * case it will be called more than once for each message. | 4675 * case it will be called more than once for each message. |
4658 * | 4676 * |
4659 * If data is specified, it will be passed to the callback when it is called. | 4677 * If data is specified, it will be passed to the callback when it is called. |
4660 * Otherwise, the exception object will be passed to the callback instead. | 4678 * Otherwise, the exception object will be passed to the callback instead. |
4661 */ | 4679 */ |
4662 static bool AddMessageListener(MessageCallback that, | 4680 static bool AddMessageListener(MessageCallback that, |
4663 Handle<Value> data = Handle<Value>()); | 4681 Handle<Value> data = Handle<Value>()); |
(...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6618 */ | 6636 */ |
6619 | 6637 |
6620 | 6638 |
6621 } // namespace v8 | 6639 } // namespace v8 |
6622 | 6640 |
6623 | 6641 |
6624 #undef TYPE_CHECK | 6642 #undef TYPE_CHECK |
6625 | 6643 |
6626 | 6644 |
6627 #endif // V8_H_ | 6645 #endif // V8_H_ |
OLD | NEW |