| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3860 * restore the connection between a global object and a context | 3860 * restore the connection between a global object and a context |
| 3861 * after DetachGlobal has been called. | 3861 * after DetachGlobal has been called. |
| 3862 * | 3862 * |
| 3863 * \param global_object The global object to reattach to the | 3863 * \param global_object The global object to reattach to the |
| 3864 * context. For this to work, the global object must be the global | 3864 * context. For this to work, the global object must be the global |
| 3865 * object that was associated with this context before a call to | 3865 * object that was associated with this context before a call to |
| 3866 * DetachGlobal. | 3866 * DetachGlobal. |
| 3867 */ | 3867 */ |
| 3868 void ReattachGlobal(Handle<Object> global_object); | 3868 void ReattachGlobal(Handle<Object> global_object); |
| 3869 | 3869 |
| 3870 /** Creates a new context. | 3870 /** |
| 3871 * Creates a new context and returns a handle to the newly allocated |
| 3872 * context. |
| 3871 * | 3873 * |
| 3872 * Returns a persistent handle to the newly allocated context. This | 3874 * \param isolate The isolate in which to create the context. |
| 3873 * persistent handle has to be disposed when the context is no | |
| 3874 * longer used so the context can be garbage collected. | |
| 3875 * | 3875 * |
| 3876 * \param extensions An optional extension configuration containing | 3876 * \param extensions An optional extension configuration containing |
| 3877 * the extensions to be installed in the newly created context. | 3877 * the extensions to be installed in the newly created context. |
| 3878 * | 3878 * |
| 3879 * \param global_template An optional object template from which the | 3879 * \param global_template An optional object template from which the |
| 3880 * global object for the newly created context will be created. | 3880 * global object for the newly created context will be created. |
| 3881 * | 3881 * |
| 3882 * \param global_object An optional global object to be reused for | 3882 * \param global_object An optional global object to be reused for |
| 3883 * the newly created context. This global object must have been | 3883 * the newly created context. This global object must have been |
| 3884 * created by a previous call to Context::New with the same global | 3884 * created by a previous call to Context::New with the same global |
| 3885 * template. The state of the global object will be completely reset | 3885 * template. The state of the global object will be completely reset |
| 3886 * and only object identify will remain. | 3886 * and only object identify will remain. |
| 3887 */ | 3887 */ |
| 3888 static Local<Context> New( |
| 3889 Isolate* isolate, |
| 3890 ExtensionConfiguration* extensions = NULL, |
| 3891 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), |
| 3892 Handle<Value> global_object = Handle<Value>()); |
| 3893 |
| 3894 /** Deprecated. Use Isolate version instead. */ |
| 3895 // TODO(mstarzinger): Put this behind the V8_DEPRECATED guard. |
| 3888 static Persistent<Context> New( | 3896 static Persistent<Context> New( |
| 3889 ExtensionConfiguration* extensions = NULL, | 3897 ExtensionConfiguration* extensions = NULL, |
| 3890 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), | 3898 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), |
| 3891 Handle<Value> global_object = Handle<Value>()); | 3899 Handle<Value> global_object = Handle<Value>()); |
| 3892 | 3900 |
| 3893 /** Returns the last entered context. */ | 3901 /** Returns the last entered context. */ |
| 3894 static Local<Context> GetEntered(); | 3902 static Local<Context> GetEntered(); |
| 3895 | 3903 |
| 3896 // TODO(svenpanne) Actually deprecate this. | 3904 // TODO(svenpanne) Actually deprecate this. |
| 3897 /** Deprecated. Use Isolate::GetCurrentContext instead. */ | 3905 /** Deprecated. Use Isolate::GetCurrentContext instead. */ |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5042 | 5050 |
| 5043 | 5051 |
| 5044 } // namespace v8 | 5052 } // namespace v8 |
| 5045 | 5053 |
| 5046 | 5054 |
| 5047 #undef V8EXPORT | 5055 #undef V8EXPORT |
| 5048 #undef TYPE_CHECK | 5056 #undef TYPE_CHECK |
| 5049 | 5057 |
| 5050 | 5058 |
| 5051 #endif // V8_H_ | 5059 #endif // V8_H_ |
| OLD | NEW |