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 6774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6785 | 6785 |
6786 ~SnapshotCreator(); | 6786 ~SnapshotCreator(); |
6787 | 6787 |
6788 /** | 6788 /** |
6789 * \returns the isolate prepared by the snapshot creator. | 6789 * \returns the isolate prepared by the snapshot creator. |
6790 */ | 6790 */ |
6791 Isolate* GetIsolate(); | 6791 Isolate* GetIsolate(); |
6792 | 6792 |
6793 /** | 6793 /** |
6794 * Add a context to be included in the snapshot blob. | 6794 * Add a context to be included in the snapshot blob. |
| 6795 * \returns the index of the context in the snapshot blob. |
6795 */ | 6796 */ |
6796 void AddContext(Local<Context> context); | 6797 size_t AddContext(Local<Context> context); |
6797 | 6798 |
6798 /** | 6799 /** |
6799 * Created a snapshot data blob. | 6800 * Created a snapshot data blob. |
6800 * \param function_code_handling whether to include compiled function code | 6801 * \param function_code_handling whether to include compiled function code |
6801 * in the snapshot. | 6802 * in the snapshot. |
6802 * \returns { nullptr, 0 } on failure, and a startup snapshot on success. The | 6803 * \returns { nullptr, 0 } on failure, and a startup snapshot on success. The |
6803 * caller acquires ownership of the data array in the return value. | 6804 * caller acquires ownership of the data array in the return value. |
6804 */ | 6805 */ |
6805 StartupData CreateBlob(FunctionCodeHandling function_code_handling); | 6806 StartupData CreateBlob(FunctionCodeHandling function_code_handling); |
6806 | 6807 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7090 * | 7091 * |
7091 * \param global_object An optional global object to be reused for | 7092 * \param global_object An optional global object to be reused for |
7092 * the newly created context. This global object must have been | 7093 * the newly created context. This global object must have been |
7093 * created by a previous call to Context::New with the same global | 7094 * created by a previous call to Context::New with the same global |
7094 * template. The state of the global object will be completely reset | 7095 * template. The state of the global object will be completely reset |
7095 * and only object identify will remain. | 7096 * and only object identify will remain. |
7096 */ | 7097 */ |
7097 static Local<Context> New( | 7098 static Local<Context> New( |
7098 Isolate* isolate, ExtensionConfiguration* extensions = NULL, | 7099 Isolate* isolate, ExtensionConfiguration* extensions = NULL, |
7099 Local<ObjectTemplate> global_template = Local<ObjectTemplate>(), | 7100 Local<ObjectTemplate> global_template = Local<ObjectTemplate>(), |
7100 Local<Value> global_object = Local<Value>()); | 7101 Local<Value> global_object = Local<Value>(), |
| 7102 size_t context_snapshot_index = 0); |
7101 | 7103 |
7102 /** | 7104 /** |
7103 * Sets the security token for the context. To access an object in | 7105 * Sets the security token for the context. To access an object in |
7104 * another context, the security tokens must match. | 7106 * another context, the security tokens must match. |
7105 */ | 7107 */ |
7106 void SetSecurityToken(Local<Value> token); | 7108 void SetSecurityToken(Local<Value> token); |
7107 | 7109 |
7108 /** Restores the security token to the default value. */ | 7110 /** Restores the security token to the default value. */ |
7109 void UseDefaultSecurityToken(); | 7111 void UseDefaultSecurityToken(); |
7110 | 7112 |
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8856 */ | 8858 */ |
8857 | 8859 |
8858 | 8860 |
8859 } // namespace v8 | 8861 } // namespace v8 |
8860 | 8862 |
8861 | 8863 |
8862 #undef TYPE_CHECK | 8864 #undef TYPE_CHECK |
8863 | 8865 |
8864 | 8866 |
8865 #endif // INCLUDE_V8_H_ | 8867 #endif // INCLUDE_V8_H_ |
OLD | NEW |