| 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 7877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7888 * template. The state of the global object will be completely reset | 7888 * template. The state of the global object will be completely reset |
| 7889 * and only object identify will remain. | 7889 * and only object identify will remain. |
| 7890 */ | 7890 */ |
| 7891 static Local<Context> New( | 7891 static Local<Context> New( |
| 7892 Isolate* isolate, ExtensionConfiguration* extensions = NULL, | 7892 Isolate* isolate, ExtensionConfiguration* extensions = NULL, |
| 7893 MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(), | 7893 MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(), |
| 7894 MaybeLocal<Value> global_object = MaybeLocal<Value>()); | 7894 MaybeLocal<Value> global_object = MaybeLocal<Value>()); |
| 7895 | 7895 |
| 7896 /** | 7896 /** |
| 7897 * Create a new context from a (non-default) context snapshot. There | 7897 * Create a new context from a (non-default) context snapshot. There |
| 7898 * is no way to provide a global template or global proxy since the | 7898 * is no way to provide a global object template since we do not create |
| 7899 * context snapshot already contains a global proxy. | 7899 * a new global object from template, but we can reuse a global object. |
| 7900 * | 7900 * |
| 7901 * \param isolate See v8::Context::New. | 7901 * \param isolate See v8::Context::New. |
| 7902 * | 7902 * |
| 7903 * \param context_snapshot_index The index of the context snapshot to | 7903 * \param context_snapshot_index The index of the context snapshot to |
| 7904 * deserialize from. Use v8::Context::New for the default snapshot. | 7904 * deserialize from. Use v8::Context::New for the default snapshot. |
| 7905 * | 7905 * |
| 7906 * \param extensions See v8::Context::New. | 7906 * \param extensions See v8::Context::New. |
| 7907 * |
| 7908 * \param global_object See v8::Context::New. |
| 7907 */ | 7909 */ |
| 7908 | 7910 |
| 7909 static MaybeLocal<Context> FromSnapshot( | 7911 static MaybeLocal<Context> FromSnapshot( |
| 7910 Isolate* isolate, size_t context_snapshot_index, | 7912 Isolate* isolate, size_t context_snapshot_index, |
| 7911 ExtensionConfiguration* extensions = nullptr); | 7913 ExtensionConfiguration* extensions = nullptr, |
| 7914 MaybeLocal<Value> global_object = MaybeLocal<Value>()); |
| 7912 | 7915 |
| 7913 /** | 7916 /** |
| 7914 * Returns an global object that isn't backed by an actual context. | 7917 * Returns an global object that isn't backed by an actual context. |
| 7915 * | 7918 * |
| 7916 * The global template needs to have access checks with handlers installed. | 7919 * The global template needs to have access checks with handlers installed. |
| 7917 * If an existing global object is passed in, the global object is detached | 7920 * If an existing global object is passed in, the global object is detached |
| 7918 * from its context. | 7921 * from its context. |
| 7919 * | 7922 * |
| 7920 * Note that this is different from a detached context where all accesses to | 7923 * Note that this is different from a detached context where all accesses to |
| 7921 * the global proxy will fail. Instead, the access check handlers are invoked. | 7924 * the global proxy will fail. Instead, the access check handlers are invoked. |
| (...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9667 */ | 9670 */ |
| 9668 | 9671 |
| 9669 | 9672 |
| 9670 } // namespace v8 | 9673 } // namespace v8 |
| 9671 | 9674 |
| 9672 | 9675 |
| 9673 #undef TYPE_CHECK | 9676 #undef TYPE_CHECK |
| 9674 | 9677 |
| 9675 | 9678 |
| 9676 #endif // INCLUDE_V8_H_ | 9679 #endif // INCLUDE_V8_H_ |
| OLD | NEW |