| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index 9bce3ef628f71b008474143e978655f14246c69d..6d7f5cab13098a1974dd3abf5c507f7f504888bc 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -7560,7 +7560,16 @@ class V8_EXPORT SnapshotCreator {
|
| Isolate* GetIsolate();
|
|
|
| /**
|
| - * Add a context to be included in the snapshot blob.
|
| + * Set the default context to be included in the snapshot blob.
|
| + * The snapshot will not contain the global proxy, and we expect one or a
|
| + * global object template to create one, to be provided upon deserialization.
|
| + */
|
| + void SetDefaultContext(Local<Context> context);
|
| +
|
| + /**
|
| + * Add additional context to be included in the snapshot blob.
|
| + * The snapshot will include the global proxy.
|
| + *
|
| * \returns the index of the context in the snapshot blob.
|
| */
|
| size_t AddContext(Local<Context> context);
|
| @@ -7884,11 +7893,22 @@ class V8_EXPORT Context {
|
| MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(),
|
| MaybeLocal<Value> global_object = MaybeLocal<Value>());
|
|
|
| + /**
|
| + * Create a new context from a (non-default) context snapshot. There
|
| + * is no way to provide a global template or global proxy since the
|
| + * context snapshot already contains a global proxy.
|
| + *
|
| + * \param isolate See v8::Context::New.
|
| + *
|
| + * \param context_snapshot_index The index of the context snapshot to
|
| + * deserialize from. Use v8::Context::New for the default snapshot.
|
| + *
|
| + * \param extensions See v8::Context::New.
|
| + */
|
| +
|
| static MaybeLocal<Context> FromSnapshot(
|
| Isolate* isolate, size_t context_snapshot_index,
|
| - ExtensionConfiguration* extensions = nullptr,
|
| - MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(),
|
| - MaybeLocal<Value> global_object = MaybeLocal<Value>());
|
| + ExtensionConfiguration* extensions = nullptr);
|
|
|
| /**
|
| * Returns an global object that isn't backed by an actual context.
|
|
|