| 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 4625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4636 * A helper class StartupDataDecompressor is provided. It implements | 4636 * A helper class StartupDataDecompressor is provided. It implements |
| 4637 * the protocol of the interaction described above, and can be used in | 4637 * the protocol of the interaction described above, and can be used in |
| 4638 * most cases instead of calling these API functions directly. | 4638 * most cases instead of calling these API functions directly. |
| 4639 */ | 4639 */ |
| 4640 static StartupData::CompressionAlgorithm GetCompressedStartupDataAlgorithm(); | 4640 static StartupData::CompressionAlgorithm GetCompressedStartupDataAlgorithm(); |
| 4641 static int GetCompressedStartupDataCount(); | 4641 static int GetCompressedStartupDataCount(); |
| 4642 static void GetCompressedStartupData(StartupData* compressed_data); | 4642 static void GetCompressedStartupData(StartupData* compressed_data); |
| 4643 static void SetDecompressedStartupData(StartupData* decompressed_data); | 4643 static void SetDecompressedStartupData(StartupData* decompressed_data); |
| 4644 | 4644 |
| 4645 /** | 4645 /** |
| 4646 * Hand startup data to V8, in case the embedder has chosen to build | |
| 4647 * V8 with external startup data. | |
| 4648 * | |
| 4649 * Note: | |
| 4650 * - By default the startup data is linked into the V8 library, in which | |
| 4651 * case this function is not meaningful. | |
| 4652 * - If this needs to be called, it needs to be called before V8 | |
| 4653 * tries to make use of its built-ins. | |
| 4654 * - To avoid unnecessary copies of data, V8 will point directly into the | |
| 4655 * given data blob, so pretty please keep it around until V8 exit. | |
| 4656 * - Compression of the startup blob might be useful, but needs to | |
| 4657 * handled entirely on the embedders' side. | |
| 4658 * - The call will abort if the data is invalid. | |
| 4659 */ | |
| 4660 static void SetNativesDataBlob(StartupData* startup_blob); | |
| 4661 static void SetSnapshotDataBlob(StartupData* startup_blob); | |
| 4662 | |
| 4663 /** | |
| 4664 * Adds a message listener. | 4646 * Adds a message listener. |
| 4665 * | 4647 * |
| 4666 * The same message listener can be added more than once and in that | 4648 * The same message listener can be added more than once and in that |
| 4667 * case it will be called more than once for each message. | 4649 * case it will be called more than once for each message. |
| 4668 * | 4650 * |
| 4669 * If data is specified, it will be passed to the callback when it is called. | 4651 * If data is specified, it will be passed to the callback when it is called. |
| 4670 * Otherwise, the exception object will be passed to the callback instead. | 4652 * Otherwise, the exception object will be passed to the callback instead. |
| 4671 */ | 4653 */ |
| 4672 static bool AddMessageListener(MessageCallback that, | 4654 static bool AddMessageListener(MessageCallback that, |
| 4673 Handle<Value> data = Handle<Value>()); | 4655 Handle<Value> data = Handle<Value>()); |
| (...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6671 */ | 6653 */ |
| 6672 | 6654 |
| 6673 | 6655 |
| 6674 } // namespace v8 | 6656 } // namespace v8 |
| 6675 | 6657 |
| 6676 | 6658 |
| 6677 #undef TYPE_CHECK | 6659 #undef TYPE_CHECK |
| 6678 | 6660 |
| 6679 | 6661 |
| 6680 #endif // V8_H_ | 6662 #endif // V8_H_ |
| OLD | NEW |