| OLD | NEW |
| 1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2728 public: | 2728 public: |
| 2729 /** Returns the global object of the context. */ | 2729 /** Returns the global object of the context. */ |
| 2730 Local<Object> Global(); | 2730 Local<Object> Global(); |
| 2731 | 2731 |
| 2732 /** | 2732 /** |
| 2733 * Detaches the global object from its context before | 2733 * Detaches the global object from its context before |
| 2734 * the global object can be reused to create a new context. | 2734 * the global object can be reused to create a new context. |
| 2735 */ | 2735 */ |
| 2736 void DetachGlobal(); | 2736 void DetachGlobal(); |
| 2737 | 2737 |
| 2738 /** |
| 2739 * Reattaches a global object to a context. This can be used to |
| 2740 * restore the connection between a global object and a context |
| 2741 * after DetachGlobal has been called. |
| 2742 * |
| 2743 * \param global_object The global object to reattach to the |
| 2744 * context. For this to work, the global object must be the global |
| 2745 * object that was associated with this context before a call to |
| 2746 * DetachGlobal. |
| 2747 */ |
| 2748 void ReattachGlobal(Handle<Object> global_object); |
| 2749 |
| 2738 /** Creates a new context. */ | 2750 /** Creates a new context. */ |
| 2739 static Persistent<Context> New( | 2751 static Persistent<Context> New( |
| 2740 ExtensionConfiguration* extensions = NULL, | 2752 ExtensionConfiguration* extensions = NULL, |
| 2741 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), | 2753 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), |
| 2742 Handle<Value> global_object = Handle<Value>()); | 2754 Handle<Value> global_object = Handle<Value>()); |
| 2743 | 2755 |
| 2744 /** Returns the last entered context. */ | 2756 /** Returns the last entered context. */ |
| 2745 static Local<Context> GetEntered(); | 2757 static Local<Context> GetEntered(); |
| 2746 | 2758 |
| 2747 /** Returns the context that is on the top of the stack. */ | 2759 /** Returns the context that is on the top of the stack. */ |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3377 | 3389 |
| 3378 } // namespace v8 | 3390 } // namespace v8 |
| 3379 | 3391 |
| 3380 | 3392 |
| 3381 #undef V8EXPORT | 3393 #undef V8EXPORT |
| 3382 #undef V8EXPORT_INLINE | 3394 #undef V8EXPORT_INLINE |
| 3383 #undef TYPE_CHECK | 3395 #undef TYPE_CHECK |
| 3384 | 3396 |
| 3385 | 3397 |
| 3386 #endif // V8_H_ | 3398 #endif // V8_H_ |
| OLD | NEW |