| 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 4036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4047 * Requires: this == Isolate::GetCurrent(). | 4047 * Requires: this == Isolate::GetCurrent(). |
| 4048 */ | 4048 */ |
| 4049 void Exit(); | 4049 void Exit(); |
| 4050 | 4050 |
| 4051 /** | 4051 /** |
| 4052 * Disposes the isolate. The isolate must not be entered by any | 4052 * Disposes the isolate. The isolate must not be entered by any |
| 4053 * thread to be disposable. | 4053 * thread to be disposable. |
| 4054 */ | 4054 */ |
| 4055 void Dispose(); | 4055 void Dispose(); |
| 4056 | 4056 |
| 4057 /** | 4057 V8_DEPRECATED("Use SetData(0, data) instead.", |
| 4058 * Associate embedder-specific data with the isolate. This legacy method | 4058 V8_INLINE void SetData(void* data)); |
| 4059 * puts the data in the 0th slot. It will be deprecated soon. | 4059 V8_DEPRECATED("Use GetData(0) instead.", V8_INLINE void* GetData()); |
| 4060 */ | |
| 4061 V8_INLINE void SetData(void* data); | |
| 4062 | 4060 |
| 4063 /** | 4061 /** |
| 4064 * Associate embedder-specific data with the isolate. |slot| has to be | 4062 * Associate embedder-specific data with the isolate. |slot| has to be |
| 4065 * between 0 and GetNumberOfDataSlots() - 1. | 4063 * between 0 and GetNumberOfDataSlots() - 1. |
| 4066 */ | 4064 */ |
| 4067 V8_INLINE void SetData(uint32_t slot, void* data); | 4065 V8_INLINE void SetData(uint32_t slot, void* data); |
| 4068 | 4066 |
| 4069 /** | 4067 /** |
| 4070 * Retrieve embedder-specific data from the isolate. This legacy method | |
| 4071 * retrieves the data from slot 0. It will be deprecated soon. | |
| 4072 * Returns NULL if SetData has never been called. | |
| 4073 */ | |
| 4074 V8_INLINE void* GetData(); | |
| 4075 | |
| 4076 /** | |
| 4077 * Retrieve embedder-specific data from the isolate. | 4068 * Retrieve embedder-specific data from the isolate. |
| 4078 * Returns NULL if SetData has never been called for the given |slot|. | 4069 * Returns NULL if SetData has never been called for the given |slot|. |
| 4079 */ | 4070 */ |
| 4080 V8_INLINE void* GetData(uint32_t slot); | 4071 V8_INLINE void* GetData(uint32_t slot); |
| 4081 | 4072 |
| 4082 /** | 4073 /** |
| 4083 * Returns the maximum number of available embedder data slots. Valid slots | 4074 * Returns the maximum number of available embedder data slots. Valid slots |
| 4084 * are in the range of 0 - GetNumberOfDataSlots() - 1. | 4075 * are in the range of 0 - GetNumberOfDataSlots() - 1. |
| 4085 */ | 4076 */ |
| 4086 V8_INLINE static uint32_t GetNumberOfDataSlots(); | 4077 V8_INLINE static uint32_t GetNumberOfDataSlots(); |
| (...skipping 2506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6593 */ | 6584 */ |
| 6594 | 6585 |
| 6595 | 6586 |
| 6596 } // namespace v8 | 6587 } // namespace v8 |
| 6597 | 6588 |
| 6598 | 6589 |
| 6599 #undef TYPE_CHECK | 6590 #undef TYPE_CHECK |
| 6600 | 6591 |
| 6601 | 6592 |
| 6602 #endif // V8_H_ | 6593 #endif // V8_H_ |
| OLD | NEW |