Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index ce5eff642ad06b36e2c8473aa4fefd4bffe0f696..39c87dcf6a13f16b6a6b0841143029aedf35433e 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -7158,14 +7158,35 @@ class V8_EXPORT Context { |
*/ |
static Local<Context> New( |
Isolate* isolate, ExtensionConfiguration* extensions = NULL, |
- Local<ObjectTemplate> global_template = Local<ObjectTemplate>(), |
- Local<Value> global_object = Local<Value>()); |
+ MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(), |
+ MaybeLocal<Value> global_object = MaybeLocal<Value>()); |
static MaybeLocal<Context> FromSnapshot( |
Isolate* isolate, size_t context_snapshot_index, |
- ExtensionConfiguration* extensions = NULL, |
- Local<ObjectTemplate> global_template = Local<ObjectTemplate>(), |
- Local<Value> global_object = Local<Value>()); |
+ ExtensionConfiguration* extensions = nullptr, |
+ MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(), |
+ MaybeLocal<Value> global_object = MaybeLocal<Value>()); |
+ |
+ /** |
+ * Returns an global object that isn't backed by an actual context. |
+ * |
+ * The global template needs to have access checks with handlers installed. |
+ * If an existing global object is passed in, the global object is detached |
+ * from its context. |
+ * |
+ * Note that this is different from a detached context where all accesses to |
+ * the global proxy will fail. Instead, the access check handlers are invoked. |
+ * |
+ * It is also not possible to detach an object returned by this method. |
+ * Instead, the access check handlers need to return nothing to achieve the |
+ * same effect. |
+ * |
+ * It is possible, however, the create a new context from the global object |
dcheng
2016/07/11 07:07:44
I think there might be a typo in this comment?
|
+ * returned by this method. |
+ */ |
+ static MaybeLocal<Object> NewRemoteContext( |
+ Isolate* isolate, Local<ObjectTemplate> global_template, |
+ MaybeLocal<Value> global_object = MaybeLocal<Value>()); |
/** |
* Sets the security token for the context. To access an object in |