Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index d15d024dc3ce11164f9b28eb026f8fa2c74e93d7..97c0d22d01f5112b6ee2b3febe503348724484bf 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -3394,13 +3394,18 @@ class V8EXPORT Context { |
| class V8EXPORT Unlocker { |
| public: |
| Unlocker(); |
| + explicit Unlocker(Isolate* isolate); |
| ~Unlocker(); |
| + private: |
| + void Init(); |
| + internal::Isolate* isolate_; |
| }; |
| class V8EXPORT Locker { |
| public: |
| Locker(); |
| + explicit Locker(Isolate* isolate); |
|
Dmitry Titov
2011/04/13 00:45:10
Consider: If it was:
explicit Locker(Isolate* isol
Dmitry Lomov
2011/04/13 00:54:12
Yes, this sounds reasonable to me
On 2011/04/13 00
Dmitry Lomov
2011/04/19 01:50:47
Done.
|
| ~Locker(); |
| /** |
| @@ -3418,18 +3423,27 @@ class V8EXPORT Locker { |
| static void StopPreemption(); |
| /** |
| - * Returns whether or not the locker is locked by the current thread. |
| + * Returns whether or not the locker for current isolate is locked by |
| + * the current thread. |
| */ |
| static bool IsLocked(); |
| /** |
| + * Returns whether or not the locker for a given isolate is locked by the current thread. |
|
Vitaly Repeshko
2011/04/15 00:29:39
nit: Long line.
Dmitry Lomov
2011/04/19 01:50:47
Done.
|
| + */ |
| + static bool IsLocked(Isolate * isolate); |
|
Vitaly Repeshko
2011/04/15 00:29:39
nit: Drop space before '*'.
Dmitry Lomov
2011/04/19 01:50:47
Done.
|
| + |
| + /** |
| * Returns whether v8::Locker is being used by this V8 instance. |
| */ |
| static bool IsActive() { return active_; } |
| private: |
| + void Init(); |
| + |
| bool has_lock_; |
| bool top_level_; |
| + internal::Isolate* isolate_; |
| static bool active_; |