| 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 7140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7151 * global object for the newly created context will be created. | 7151 * global object for the newly created context will be created. |
| 7152 * | 7152 * |
| 7153 * \param global_object An optional global object to be reused for | 7153 * \param global_object An optional global object to be reused for |
| 7154 * the newly created context. This global object must have been | 7154 * the newly created context. This global object must have been |
| 7155 * created by a previous call to Context::New with the same global | 7155 * created by a previous call to Context::New with the same global |
| 7156 * template. The state of the global object will be completely reset | 7156 * template. The state of the global object will be completely reset |
| 7157 * and only object identify will remain. | 7157 * and only object identify will remain. |
| 7158 */ | 7158 */ |
| 7159 static Local<Context> New( | 7159 static Local<Context> New( |
| 7160 Isolate* isolate, ExtensionConfiguration* extensions = NULL, | 7160 Isolate* isolate, ExtensionConfiguration* extensions = NULL, |
| 7161 Local<ObjectTemplate> global_template = Local<ObjectTemplate>(), | 7161 MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(), |
| 7162 Local<Value> global_object = Local<Value>()); | 7162 MaybeLocal<Value> global_object = MaybeLocal<Value>()); |
| 7163 | 7163 |
| 7164 static MaybeLocal<Context> FromSnapshot( | 7164 static MaybeLocal<Context> FromSnapshot( |
| 7165 Isolate* isolate, size_t context_snapshot_index, | 7165 Isolate* isolate, size_t context_snapshot_index, |
| 7166 ExtensionConfiguration* extensions = NULL, | 7166 ExtensionConfiguration* extensions = nullptr, |
| 7167 Local<ObjectTemplate> global_template = Local<ObjectTemplate>(), | 7167 MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(), |
| 7168 Local<Value> global_object = Local<Value>()); | 7168 MaybeLocal<Value> global_object = MaybeLocal<Value>()); |
| 7169 |
| 7170 /** |
| 7171 * Returns an global object that isn't backed by an actual context. |
| 7172 * |
| 7173 * The global template needs to have access checks with handlers installed. |
| 7174 * If an existing global object is passed in, the global object is detached |
| 7175 * from its context. |
| 7176 * |
| 7177 * Note that this is different from a detached context where all accesses to |
| 7178 * the global proxy will fail. Instead, the access check handlers are invoked. |
| 7179 * |
| 7180 * It is also not possible to detach an object returned by this method. |
| 7181 * Instead, the access check handlers need to return nothing to achieve the |
| 7182 * same effect. |
| 7183 * |
| 7184 * It is possible, however, the create a new context from the global object |
| 7185 * returned by this method. |
| 7186 */ |
| 7187 static MaybeLocal<Object> NewRemoteContext( |
| 7188 Isolate* isolate, Local<ObjectTemplate> global_template, |
| 7189 MaybeLocal<Value> global_object = MaybeLocal<Value>()); |
| 7169 | 7190 |
| 7170 /** | 7191 /** |
| 7171 * Sets the security token for the context. To access an object in | 7192 * Sets the security token for the context. To access an object in |
| 7172 * another context, the security tokens must match. | 7193 * another context, the security tokens must match. |
| 7173 */ | 7194 */ |
| 7174 void SetSecurityToken(Local<Value> token); | 7195 void SetSecurityToken(Local<Value> token); |
| 7175 | 7196 |
| 7176 /** Restores the security token to the default value. */ | 7197 /** Restores the security token to the default value. */ |
| 7177 void UseDefaultSecurityToken(); | 7198 void UseDefaultSecurityToken(); |
| 7178 | 7199 |
| (...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8914 */ | 8935 */ |
| 8915 | 8936 |
| 8916 | 8937 |
| 8917 } // namespace v8 | 8938 } // namespace v8 |
| 8918 | 8939 |
| 8919 | 8940 |
| 8920 #undef TYPE_CHECK | 8941 #undef TYPE_CHECK |
| 8921 | 8942 |
| 8922 | 8943 |
| 8923 #endif // INCLUDE_V8_H_ | 8944 #endif // INCLUDE_V8_H_ |
| OLD | NEW |