Chromium Code Reviews| 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 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | |
|
jochen (gone - plz use gerrit)
2014/05/23 11:44:44
embedders won't see this #define, the api should a
vogelheim
2014/05/26 12:36:03
Done.
| |
| 4669 static void SetNativesDataBlob(StartupData* startup_blob); | |
| 4670 static void SetSnapshotDataBlob(StartupData* startup_blob); | |
| 4671 #endif | |
| 4672 | |
| 4673 /** | |
| 4654 * Adds a message listener. | 4674 * Adds a message listener. |
| 4655 * | 4675 * |
| 4656 * The same message listener can be added more than once and in that | 4676 * 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. | 4677 * case it will be called more than once for each message. |
| 4658 * | 4678 * |
| 4659 * If data is specified, it will be passed to the callback when it is called. | 4679 * 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. | 4680 * Otherwise, the exception object will be passed to the callback instead. |
| 4661 */ | 4681 */ |
| 4662 static bool AddMessageListener(MessageCallback that, | 4682 static bool AddMessageListener(MessageCallback that, |
| 4663 Handle<Value> data = Handle<Value>()); | 4683 Handle<Value> data = Handle<Value>()); |
| (...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6618 */ | 6638 */ |
| 6619 | 6639 |
| 6620 | 6640 |
| 6621 } // namespace v8 | 6641 } // namespace v8 |
| 6622 | 6642 |
| 6623 | 6643 |
| 6624 #undef TYPE_CHECK | 6644 #undef TYPE_CHECK |
| 6625 | 6645 |
| 6626 | 6646 |
| 6627 #endif // V8_H_ | 6647 #endif // V8_H_ |
| OLD | NEW |