 Chromium Code Reviews
 Chromium Code Reviews Issue 13799003:
  Change Context::New not create persistent handles.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 13799003:
  Change Context::New not create persistent handles.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| 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 3846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3857 * restore the connection between a global object and a context | 3857 * restore the connection between a global object and a context | 
| 3858 * after DetachGlobal has been called. | 3858 * after DetachGlobal has been called. | 
| 3859 * | 3859 * | 
| 3860 * \param global_object The global object to reattach to the | 3860 * \param global_object The global object to reattach to the | 
| 3861 * context. For this to work, the global object must be the global | 3861 * context. For this to work, the global object must be the global | 
| 3862 * object that was associated with this context before a call to | 3862 * object that was associated with this context before a call to | 
| 3863 * DetachGlobal. | 3863 * DetachGlobal. | 
| 3864 */ | 3864 */ | 
| 3865 void ReattachGlobal(Handle<Object> global_object); | 3865 void ReattachGlobal(Handle<Object> global_object); | 
| 3866 | 3866 | 
| 3867 /** Creates a new context. | 3867 /** | 
| 3868 * Creates a new context and returns a handle to the newly allocated | |
| 3869 * context. | |
| 3868 * | 3870 * | 
| 3869 * Returns a persistent handle to the newly allocated context. This | 3871 * \param isolate The isolate in which to create the context. | 
| 3870 * persistent handle has to be disposed when the context is no | |
| 3871 * longer used so the context can be garbage collected. | |
| 3872 * | 3872 * | 
| 3873 * \param extensions An optional extension configuration containing | 3873 * \param extensions An optional extension configuration containing | 
| 3874 * the extensions to be installed in the newly created context. | 3874 * the extensions to be installed in the newly created context. | 
| 3875 * | 3875 * | 
| 3876 * \param global_template An optional object template from which the | 3876 * \param global_template An optional object template from which the | 
| 3877 * global object for the newly created context will be created. | 3877 * global object for the newly created context will be created. | 
| 3878 * | 3878 * | 
| 3879 * \param global_object An optional global object to be reused for | 3879 * \param global_object An optional global object to be reused for | 
| 3880 * the newly created context. This global object must have been | 3880 * the newly created context. This global object must have been | 
| 3881 * created by a previous call to Context::New with the same global | 3881 * created by a previous call to Context::New with the same global | 
| 3882 * template. The state of the global object will be completely reset | 3882 * template. The state of the global object will be completely reset | 
| 3883 * and only object identify will remain. | 3883 * and only object identify will remain. | 
| 3884 */ | 3884 */ | 
| 3885 static Local<Context> New( | |
| 3886 Isolate* isolate, | |
| 3887 ExtensionConfiguration* extensions = NULL, | |
| 3888 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), | |
| 3889 Handle<Value> global_object = Handle<Value>()); | |
| 3890 | |
| 3891 /** Deprecated. Use Isolate version instead. */ | |
| 
Sven Panne
2013/04/09 07:08:33
Perhaps add an explicit TODO for inserting V8_DEPR
 
Michael Starzinger
2013/04/09 13:29:18
Done.
 | |
| 3885 static Persistent<Context> New( | 3892 static Persistent<Context> New( | 
| 3886 ExtensionConfiguration* extensions = NULL, | 3893 ExtensionConfiguration* extensions = NULL, | 
| 3887 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), | 3894 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), | 
| 3888 Handle<Value> global_object = Handle<Value>()); | 3895 Handle<Value> global_object = Handle<Value>()); | 
| 3889 | 3896 | 
| 3890 /** Returns the last entered context. */ | 3897 /** Returns the last entered context. */ | 
| 3891 static Local<Context> GetEntered(); | 3898 static Local<Context> GetEntered(); | 
| 3892 | 3899 | 
| 3893 /** Returns the context that is on the top of the stack. */ | 3900 /** Returns the context that is on the top of the stack. */ | 
| 3894 static Local<Context> GetCurrent(); | 3901 static Local<Context> GetCurrent(); | 
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5039 | 5046 | 
| 5040 | 5047 | 
| 5041 } // namespace v8 | 5048 } // namespace v8 | 
| 5042 | 5049 | 
| 5043 | 5050 | 
| 5044 #undef V8EXPORT | 5051 #undef V8EXPORT | 
| 5045 #undef TYPE_CHECK | 5052 #undef TYPE_CHECK | 
| 5046 | 5053 | 
| 5047 | 5054 | 
| 5048 #endif // V8_H_ | 5055 #endif // V8_H_ | 
| OLD | NEW |