@@ -107,6 +107,10 @@ class V8_EXPORT Context : public Data {
107
107
* configured if the default context snapshot contains no pointer embedder
108
108
* data, or if no custom startup snapshot is configured in the
109
109
* v8::CreateParams used to create the isolate.
110
+ *
111
+ * \param api_wrapper_deserializer An optional callback used to deserialize
112
+ * API wrapper objects that was initially set with v8::Object::Wrap() and then
113
+ * serialized using SerializeAPIWrapperCallback.
110
114
*/
111
115
static Local<Context> New (
112
116
Isolate* isolate, ExtensionConfiguration* extensions = nullptr ,
@@ -116,17 +120,19 @@ class V8_EXPORT Context : public Data {
116
120
DeserializeInternalFieldsCallback(),
117
121
MicrotaskQueue* microtask_queue = nullptr,
118
122
DeserializeContextDataCallback context_data_deserializer =
119
- DeserializeContextDataCallback());
123
+ DeserializeContextDataCallback(),
124
+ DeserializeAPIWrapperCallback api_wrapper_deserializer =
125
+ DeserializeAPIWrapperCallback());
120
126
121
127
/* *
122
128
* Create a new context from a (non-default) context snapshot. There
123
129
* is no way to provide a global object template since we do not create
124
130
* a new global object from template, but we can reuse a global object.
125
131
*
126
- * \param isolate See v8::Context::New.
132
+ * \param isolate See v8::Context::New() .
127
133
*
128
134
* \param context_snapshot_index The index of the context snapshot to
129
- * deserialize from. Use v8::Context::New for the default snapshot.
135
+ * deserialize from. Use v8::Context::New() for the default snapshot.
130
136
*
131
137
* \param internal_fields_deserializer An optional callback used
132
138
* to deserialize fields set by
@@ -136,19 +142,23 @@ class V8_EXPORT Context : public Data {
136
142
* pointer fields in the default context snapshot or if no startup
137
143
* snapshot is configured when the isolate is created.
138
144
*
139
- * \param extensions See v8::Context::New.
145
+ * \param extensions See v8::Context::New() .
140
146
*
141
- * \param global_object See v8::Context::New.
147
+ * \param global_object See v8::Context::New() .
142
148
*
143
149
* \param internal_fields_deserializer Similar to
144
- * internal_fields_deserializer in v8::Context::New but applies to
150
+ * internal_fields_deserializer in v8::Context::New() but applies to
145
151
* the context specified by the context_snapshot_index.
146
152
*
147
- * \param microtask_queue See v8::Context::New.
153
+ * \param microtask_queue See v8::Context::New() .
148
154
*
149
155
* \param context_data_deserializer Similar to
150
- * context_data_deserializer in v8::Context::New but applies to
156
+ * context_data_deserializer in v8::Context::New() but applies to
151
157
* the context specified by the context_snapshot_index.
158
+ *
159
+ *\param api_wrapper_deserializer Similar to api_wrapper_deserializer in
160
+ * v8::Context::New() but applies to the context specified by the
161
+ * context_snapshot_index.
152
162
*/
153
163
static MaybeLocal<Context> FromSnapshot (
154
164
Isolate* isolate, size_t context_snapshot_index,
@@ -158,7 +168,9 @@ class V8_EXPORT Context : public Data {
158
168
MaybeLocal<Value> global_object = MaybeLocal<Value>(),
159
169
MicrotaskQueue* microtask_queue = nullptr,
160
170
DeserializeContextDataCallback context_data_deserializer =
161
- DeserializeContextDataCallback());
171
+ DeserializeContextDataCallback(),
172
+ DeserializeAPIWrapperCallback api_wrapper_deserializer =
173
+ DeserializeAPIWrapperCallback());
162
174
163
175
/* *
164
176
* Returns an global object that isn't backed by an actual context.
0 commit comments