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