| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index 94436a50e8aeac1c6aa24b72c14d6e083134e7b3..20583c852ca83d686b31099cc562359d99714289 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -4487,6 +4487,9 @@ class V8_EXPORT FunctionTemplate : public Template {
|
| Local<Value> data = Local<Value>(),
|
| Local<Signature> signature = Local<Signature>(), int length = 0);
|
|
|
| + /** Get a template included in the snapshot by index. */
|
| + static Local<FunctionTemplate> FromSnapshot(Isolate* isolate, size_t index);
|
| +
|
| /**
|
| * Creates a function template with a fast handler. If a fast handler is set,
|
| * the callback cannot be null.
|
| @@ -4662,6 +4665,9 @@ class V8_EXPORT ObjectTemplate : public Template {
|
| Local<FunctionTemplate> constructor = Local<FunctionTemplate>());
|
| static V8_DEPRECATED("Use isolate version", Local<ObjectTemplate> New());
|
|
|
| + /** Get a template included in the snapshot by index. */
|
| + static Local<ObjectTemplate> FromSnapshot(Isolate* isolate, size_t index);
|
| +
|
| /** Creates a new instance of this template.*/
|
| V8_DEPRECATE_SOON("Use maybe version", Local<Object> NewInstance());
|
| V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context);
|
| @@ -6811,6 +6817,12 @@ class SnapshotCreator {
|
| size_t AddContext(Local<Context> context);
|
|
|
| /**
|
| + * Add a template to be included in the snapshot blob.
|
| + * \returns the index of the template in the snapshot blob.
|
| + */
|
| + size_t AddTemplate(Local<Template> template_obj);
|
| +
|
| + /**
|
| * Created a snapshot data blob.
|
| * This must not be called from within a handle scope.
|
| * \param function_code_handling whether to include compiled function code
|
|
|